Skip to content

Commit

Permalink
fix main.yaml syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan committed Jun 9, 2023
1 parent 42db5c0 commit af272df
Showing 1 changed file with 45 additions and 45 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,48 +139,48 @@ jobs:

- name: run anchor tests
run: bash test-scripts/run-anchor-tests.sh
check-for-sdk-changes:
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
sdk: ${{ steps.filter.outputs.sdk }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
sdk:
- 'sdk/src/**'
release:
runs-on: ubuntu-latest
needs: [fmt-clippy, unit, cargo-audit, yarn-prettier, yarn-lint, anchor-tests, check-for-sdk-changes]
if: ${{ github.ref == 'refs/heads/master' && needs.check-for-sdk-changes.outputs.sdk == 'true' }}
defaults:
run:
working-directory: ./sdk
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Build sdk
run: yarn
- run: yarn build
- name: Update package version
run: npm version prerelease --preid=beta
- name: Git commit
run: |
VERSION=$(node -e "console.log(require('./package.json').version);")
git config user.name "GitHub Actions"
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add ..
git commit -a -m "sdk: release v$VERSION"
git push origin HEAD
- name: Publish to npm
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
check-for-sdk-changes:
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
sdk: ${{ steps.filter.outputs.sdk }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
sdk:
- 'sdk/src/**'
release:
runs-on: ubuntu-latest
needs: [fmt-clippy, unit, cargo-audit, yarn-prettier, yarn-lint, anchor-tests, check-for-sdk-changes]
if: ${{ github.ref == 'refs/heads/master' && needs.check-for-sdk-changes.outputs.sdk == 'true' }}
defaults:
run:
working-directory: ./sdk
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Build sdk
run: yarn
- run: yarn build
- name: Update package version
run: npm version prerelease --preid=beta
- name: Git commit
run: |
VERSION=$(node -e "console.log(require('./package.json').version);")
git config user.name "GitHub Actions"
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add ..
git commit -a -m "sdk: release v$VERSION"
git push origin HEAD
- name: Publish to npm
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit af272df

Please sign in to comment.