-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
b2c1f59
commit 456dd44
Showing
2 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
4 changes: 1 addition & 3 deletions
4
.github/workflows/release-please.yml → .github/workflows/release-beta.yml
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,11 +1,9 @@ | ||
--- | ||
name: Release Please | ||
name: Release (beta) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- alpha | ||
- beta | ||
|
||
permissions: | ||
|
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.ECOSPARK_APP_ID }} | ||
private_key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }} | ||
# This action will create a release PR when regular conventional commits are pushed to main, it'll also detect if a release PR is merged and npm publish should happen | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
release-type: node | ||
command: manifest | ||
token: ${{ steps.generate-token.outputs.token }} | ||
|
||
# Publish to NPM on new releases | ||
- uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.releases_created }} | ||
- uses: pnpm/action-setup@v2 | ||
if: ${{ steps.release.outputs.releases_created }} | ||
- uses: actions/setup-node@v3 | ||
if: ${{ steps.release.outputs.releases_created }} | ||
with: | ||
cache: pnpm | ||
node-version: lts/* | ||
- name: install deps & build | ||
run: corepack enable && pnpm --version && pnpm install --ignore-scripts | ||
if: ${{ steps.release.outputs.releases_created }} | ||
- name: Set publishing config | ||
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" | ||
if: ${{ steps.release.outputs.releases_created }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}} | ||
# Release Please has already incremented versions and published tags, so we just | ||
# need to publish all unpublished versions to NPM here | ||
- run: pnpm -r publish | ||
if: ${{ steps.release.outputs.releases_created }} |