Skip to content

Commit

Permalink
ci: add release dry-run (#34)
Browse files Browse the repository at this point in the history
* ci: add release dry-run
  • Loading branch information
dbhagen authored Nov 14, 2024
1 parent 87791de commit c7e7160
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,54 @@ on:
jobs:
code-validation:
uses: ./.github/workflows/code_validation.yml

release-dry-run:
name: Release Dry Run
needs: [code-validation]
runs-on: ubuntu-latest
concurrency: release

permissions:
id-token: write
contents: write
issues: write
pull-requests: write
packages: write

env:
HUSKY: 0

steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"

- name: Install dependencies
run: |
yarn install
- name: Build Typescript Definitions
run: |
yarn tsc
- name: Build
run: |
yarn build
- name: Bump and Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSH_KEY: ${{ secrets.DEPLOY_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# the below line gets us locally to the result of the PR merge on the correct ref
git checkout -b ${{ github.base_ref }} pull/${{ github.event.number }}/merge
unset GITHUB_ACTIONS && npx semantic-release --dry-run --no-ci
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,5 @@ jobs:
- name: Bump and Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

0 comments on commit c7e7160

Please sign in to comment.