Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add release dry-run #34

Merged
merged 8 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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