Skip to content

Commit

Permalink
chore: update release script (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler authored May 13, 2024
1 parent 062fb5c commit 536e820
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,36 @@ on:
branches:
- main
- alpha

jobs:
release:
name: Release
environment:
name: npm-production
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
contents: read # for checkout
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Create app token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.ECOSPARK_APP_ID }}
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Need all history to analyze commits since last release
fetch-depth: 0
# Uses generated token to allow pushing commits back
token: ${{ steps.app-token.outputs.token }}
# Make sure GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*

Expand All @@ -37,6 +45,7 @@ jobs:

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: npx semantic-release

0 comments on commit 536e820

Please sign in to comment.