Skip to content

Commit

Permalink
fix: only publish on main and chore(releases)
Browse files Browse the repository at this point in the history
  • Loading branch information
CasLubbers committed Jan 16, 2025
1 parent 5fc2716 commit a1eaa39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
echo '::set-output name=diff::1'
- uses: actions/setup-node@v2
if: steps.vars.outputs.diff == 1 && github.ref == 'refs/heads/main'
if: steps.vars.outputs.diff == 1 && startsWith(github.ref, 'refs/heads/main') && startsWith(github.event.head_commit.message, 'chore(release)') && !github.event.act
with:
node-version: '14'
registry-url: 'https://npm.pkg.github.com'
scope: '@linode'
- name: Build and publish clients
if: steps.vars.outputs.diff == 1 && github.ref == 'refs/heads/main'
if: steps.vars.outputs.diff == 1 && startsWith(github.ref, 'refs/heads/main') && startsWith(github.event.head_commit.message, 'chore(release)') && !github.event.act
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down

0 comments on commit a1eaa39

Please sign in to comment.