Skip to content

Commit

Permalink
Fix release
Browse files Browse the repository at this point in the history
  • Loading branch information
rlepinski committed May 13, 2024
1 parent 612a83d commit 2b5e1cf
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,39 @@ jobs:
uses: actions/checkout@v4
- name: Check Version
run: bash ./scripts/check_version.sh ${GITHUB_REF/refs\/tags\//}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Get the release notes
id: get_release_notes
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
NOTES="$(awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md)"
NOTES="${NOTES//'%'/'%25'}"
NOTES="${NOTES//$'\n'/'%0A'}"
NOTES="${NOTES//$'\r'/'%0D'}"
echo ::set-output name=NOTES::"$NOTES"
- uses: actions/setup-node@master
with:
node-version: 21
registry-url: https://registry.npmjs.org/
- name: Verify
run: npm ci && npm run verify
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Github Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.get_release_notes.outputs.NOTES }}
draft: false
prerelease: false
- name: Publish Docs
run: npm publish --access public
- name: Setup GCP Auth
Expand Down

0 comments on commit 2b5e1cf

Please sign in to comment.