-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add version.yml and action/setup.yml
- Loading branch information
1 parent
2504603
commit 7b273fc
Showing
4 changed files
with
923 additions
and
789 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,52 @@ | ||
--- | ||
name: Setup | ||
description: Setup Node.js and install dependencies. | ||
|
||
inputs: | ||
node_auth_token: | ||
description: The Node.js auth token. | ||
required: true | ||
node_version: | ||
description: The Node.js version. | ||
required: false | ||
default: "20" | ||
registry_url: | ||
description: The Node.js package registry URL. | ||
required: false | ||
default: https://npm.pkg.github.com | ||
install_dependencies: | ||
description: Install dependencies. | ||
required: false | ||
default: "true" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
if: inputs.install_dependencies == 'true' | ||
with: | ||
cache: npm | ||
node-version: ${{ inputs.node_version }} | ||
registry-url: ${{ inputs.registry_url }} | ||
- name: Setup Node.js without cache | ||
uses: actions/setup-node@v4 | ||
if: inputs.install_dependencies == 'false' | ||
with: | ||
node-version: ${{ inputs.node_version }} | ||
registry-url: ${{ inputs.registry_url }} | ||
- name: Install dependencies | ||
if: inputs.install_dependencies == 'true' | ||
shell: bash | ||
run: npm ci --ignore-scripts | ||
env: | ||
NODE_AUTH_TOKEN: ${{ inputs.node_auth_token }} | ||
- name: Rebuild Node.js modules | ||
shell: bash | ||
run: npm rebuild | ||
- name: Run postinstall script | ||
shell: bash | ||
run: npm run postinstall --if-present | ||
- name: Run prepare script | ||
shell: bash | ||
run: npm run prepare --if-present |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
name: Version | ||
|
||
run-name: Cut ${{ github.event.inputs.version }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to cut | ||
required: true | ||
|
||
jobs: | ||
tag: | ||
name: Tag | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
git_committer_name: ${{ secrets.GIT_USER_NAME }} | ||
git_committer_email: ${{ secrets.GIT_USER_EMAIL }} | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
node_auth_token: ${{ secrets.GH_TOKEN }} | ||
- name: Cut ${{ github.event.inputs.version }} version | ||
run: npm version --sign-git-tag=true ${{ github.event.inputs.version }} |
Oops, something went wrong.