Skip to content

Commit

Permalink
Uodate publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
G4brym committed Nov 11, 2024
1 parent 27093d1 commit e89e245
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions .github/workflows/publish.yml
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 }}

0 comments on commit e89e245

Please sign in to comment.