-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2105 from Hyperkid123/unify-release-workflow
chore: move release action into composite action
- Loading branch information
Showing
3 changed files
with
61 additions
and
58 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,54 @@ | ||
name: Release job | ||
description: build affected packages and publish them to npm | ||
inputs: | ||
npm_token: | ||
description: 'NPM token' | ||
required: true | ||
gh_token: | ||
description: 'Github token' | ||
required: true | ||
gh_name: | ||
description: 'Github name' | ||
required: true | ||
gh_email: | ||
description: 'Github email' | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Use Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
- uses: nrwl/nx-set-shas@v4 | ||
- uses: './.github/actions/cache' | ||
- name: Install deps | ||
shell: bash | ||
run: npm i | ||
- name: git config | ||
shell: bash | ||
run: | | ||
git config user.name "${{ inputs.gh_name }}" | ||
git config user.email "${{ inputs.gh_email }}" | ||
- name: Build | ||
shell: bash | ||
run: npx nx run-many -t build --exclude=demo, | ||
- name: Set publish config | ||
env: | ||
NPM_TOKEN: ${{ inputs.npm_token }} | ||
shell: bash | ||
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||
- name: Version | ||
shell: bash | ||
env: | ||
# skip the git hooks | ||
HUSKY: 0 | ||
GH_TOKEN: ${{ inputs.gh_token }} | ||
GITHUB_TOKEN: ${{ inputs.gh_token }} | ||
run: npx nx affected --base=last-release --parallel=1 --target=version --trackDeps --exclude=@redhat-cloud-services/executors,demo | ||
- name: Tag last-release | ||
shell: bash | ||
run: | | ||
git tag -f last-release | ||
git push origin last-release --force --no-verify | ||
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 was deleted.
Oops, something went wrong.