Skip to content

Commit

Permalink
fix: release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlwn123 committed Sep 6, 2024
1 parent fcdf421 commit 49240f6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ jobs:

release:
name: Release
permissions:
contents: write
id-token: write
pull-requests: write
needs: verify
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand All @@ -29,22 +27,28 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install-deps

- name: 🏗 Setup Node
uses: actions/setup-node@v3
with:
registry-url: 'https://npm.pkg.github.com'

- name: Create Release Pull Request
uses: changesets/action@v1
with:
publish: pnpm release
createGithubReleases: ${{ github.ref == 'refs/heads/main' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish prerelease
if: steps.changesets.outputs.published != 'true'
continue-on-error: true
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
npm config set "//registry.npmjs.org/:_authToken" "$NODE_AUTH_TOKEN"
git reset --hard origin/main
pnpm clean
pnpm changeset version --no-git-tag --snapshot canary
Expand Down
5 changes: 0 additions & 5 deletions .npmrc

This file was deleted.

3 changes: 2 additions & 1 deletion packages/core-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"typescript": "^5.2.2"
},
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
}
}
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 49240f6

Please sign in to comment.