-
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.
feat: Configure semantic release (#577)
* Generate archive for rules_task before publishing * Setup release job * Setup pnpm in CI * Load secret with 1Password
- Loading branch information
Showing
6 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
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,34 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
pull_request: | ||
branches: | ||
- "*" | ||
jobs: | ||
release: | ||
name: Release | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: | | ||
- cwd: ./rules/rules_task | ||
- name: Load secret | ||
uses: 1password/load-secrets-action@v1 | ||
with: | ||
export-env: true | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.ONEPASSWORD_SERVICE_ACCOUNT_TOKEN_DEV }} | ||
GH_TOKEN: "op://vgijssel-dev/semantic-release-setup/credential" | ||
|
||
- name: Run release | ||
run: pnpm exec semantic-release | ||
working-directory: ./rules/rules_task |
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 |
---|---|---|
|
@@ -45,5 +45,7 @@ jobs: | |
uses: actions/checkout@v4 | ||
- name: Install devbox | ||
uses: jetpack-io/[email protected] | ||
with: | ||
enable-cache: "true" | ||
- name: Run linters | ||
run: devbox run lefthook run all |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,9 @@ | ||
#!/usr/bin/env bash | ||
set -Eeou pipefail | ||
|
||
export VERSION=$1 | ||
|
||
export PREFIX="rules_task-$VERSION" | ||
export ARCHIVE="rules_task-$VERSION.tar.gz" | ||
|
||
git archive --format=tar --prefix=${PREFIX}/ HEAD | gzip > $ARCHIVE |