Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: full git history in CI & filter tags for release notes (#2364)
* initial steps to separate * fix: separate pack&upload for manual runs * fix: get all history from git so we have tags. * fix: assume branch is in correct state in CI. Filter out tags to only get those starting with "v" and not containing "-" (dist tags) * fix: use correct job name for it
- Loading branch information
Showing
4 changed files
with
67 additions
and
59 deletions.
There are no files selected for viewing
47 changes: 1 addition & 46 deletions
47
.github/workflows/publish-pack-upload.yml → .github/workflows/pack-upload.yml
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,53 @@ | ||
name: Publish NPM & Github Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
isPreRelease: | ||
description: is release for beta/rc/dev? | ||
type: boolean | ||
required: false | ||
default: false | ||
|
||
workflow_call: | ||
inputs: | ||
isPreRelease: | ||
description: is release for beta/rc/dev? | ||
type: boolean | ||
required: false | ||
default: false | ||
|
||
jobs: | ||
publish-npm-and-github: | ||
runs-on: pub-hk-ubuntu-22.04-small | ||
permissions: | ||
# give secrets.GITHUB_TOKEN ability to push/tag/release | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# checkout entire repo, not just this branch. Tags are needed release script | ||
fetch-depth: 0 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: yarn | ||
- run: yarn --frozen-lockfile --network-timeout 1000000 | ||
- name: set NPM auth | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH_KEY }}" > ~/.npmrc | ||
- name: set git user | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "heroku-front-end+npm-releases@salesforce.com" | ||
- name: Publish to NPM & GitHub release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
if ${{ inputs.isPreRelease }} | ||
then | ||
bash scripts/publish-prerelease | ||
else | ||
bash scripts/publish-release | ||
fi | ||
shell: bash |
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