-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,29 @@ | ||
name: Publish | ||
on: | ||
workflow_run: | ||
workflows: [CI] | ||
branches: [main] | ||
types: [completed] | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "npm" | ||
|
||
- run: npm install --frozen-lockfile | ||
- run: npm run build | ||
- name: Create Release Pull Request or Publish | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npm publish --access public | ||
node-version: 22.x | ||
cache: 'npm' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install modules | ||
run: npm install | ||
- name: Run build | ||
run: npm run lint && npm run build | ||
- name: Run tests | ||
run: npm run test | ||
- name: Publish to npm | ||
run: npm publish --access public | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.WRANGLER_PUBLISHER_NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.WRANGLER_PUBLISHER_NPM_TOKEN }} |