Skip to content

Commit

Permalink
ci: up perms
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Feb 28, 2024
1 parent 1c577f0 commit 3ac69b8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 45 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/canary.yml

This file was deleted.

24 changes: 23 additions & 1 deletion .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
changesets:
name: Changesets
needs: verify
permissions:
contents: write
id-token: write
issues: write
repository-projects: write
deployments: write
packages: write
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 5

Expand All @@ -38,4 +46,18 @@ jobs:
version: pnpm changeset:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish Prerelease
if: steps.changesets.outputs.published != 'true'
continue-on-error: true
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
git reset --hard origin/main
pnpm clean
pnpm changeset version --no-git-tag --snapshot canary
pnpm changeset:prepublish
pnpm changeset publish --no-git-tag --snapshot canary --tag canary

0 comments on commit 3ac69b8

Please sign in to comment.