-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(infra): add an automated release (#682)
- Loading branch information
1 parent
423b5a8
commit 9332f91
Showing
1 changed file
with
31 additions
and
0 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,31 @@ | ||
name: Release | ||
on: | ||
# manual trigger | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
name: release | ||
runs-on: | ||
group: npm-deploy | ||
environment: | ||
name: release | ||
steps: | ||
- name: Load secret | ||
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 | ||
with: | ||
# Export loaded secrets as environment variables | ||
export-env: true | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | ||
# You may need to change this to your vault name and secret name | ||
# Refer to it by calling env.NPM_TOKEN | ||
# This token is also limited by IP to ONLY work on the runner | ||
NPM_TOKEN: op://npm-deploy/npm-runner-token/secret | ||
|
||
- name: Release | ||
env: | ||
NPM_CONFIG_USERCONFIG: /dev/null | ||
NPM_TOKEN: ${{ env.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Optional | ||
run: yarn g:release |