Skip to content

chore(release): 5.0.17 #86

chore(release): 5.0.17

chore(release): 5.0.17 #86

Workflow file for this run

name: Releases
on:
push:
branches:
- main
jobs:
merged-pr:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Generate GitHub app token
id: generate_app_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.HYPER_SDK_APP_ID }}
private-key: ${{ secrets.HYPER_SDK_APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ steps.generate_app_token.outputs.token }}
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Determine release type
id: determine-release
run: |
shopt -s nocasematch
COMMITS="$(git log --format=%B ${{ github.event.before }}..${{ github.sha }})"
if echo "$COMMITS" | grep -Eq '(\[breaking\]|\[major\])'; then
echo "release_type=major" >> "$GITHUB_OUTPUT"
elif echo "$COMMITS" | grep -Eq '\[minor\]'; then
echo "release_type=minor" >> "$GITHUB_OUTPUT"
else
echo "release_type=patch" >> "$GITHUB_OUTPUT"
fi
shopt -u nocasematch
shell: bash
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/[email protected]
with:
github-token: ${{ steps.generate_app_token.outputs.token }}
release-count: 0
skip-version-file: "true"
skip-commit: "true"
git-push: "false"
skip-tag: "true"
skip-bump: "true"
output-file: "false"
- name: Stash changes
run: git reset --hard
- name: git config
run: |
git config --local user.name 'hyper-sdk-app[bot]'
git config --local user.email '163947841+hyper-sdk-app[bot]@users.noreply.github.com'
- name: Run standard version
id: standard-version
run: |
npx standard-version --release-as ${{ steps.determine-release.outputs.release_type }}
echo "tag_name=$(git describe --abbrev=0 --tags)" >>"$GITHUB_OUTPUT"
- name: Push tags and changelog
run: git push --follow-tags origin main
- name: Create GitHub release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ steps.generate_app_token.outputs.token }}
with:
tag_name: "${{ steps.standard-version.outputs.tag_name }}"
release_name: "${{ steps.standard-version.outputs.tag_name }}"
body: "${{ steps.changelog.outputs.clean_changelog }}"
- name: Publish package on NPM 📦
run: npm publish --access public