Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/github-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: github-release

"on":
push:
tags:
- '@acedatacloud/nexior_v*'
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Prepare metadata
id: meta
shell: bash
run: |
TAG="${GITHUB_REF_NAME}"
SAFE_TAG="${TAG//\//-}"
if [[ "$TAG" == *"_v"* ]]; then
VERSION="${TAG##*_v}"
else
VERSION="${TAG#v}"
fi
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
echo "safe_tag=${SAFE_TAG}" >> "$GITHUB_OUTPUT"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

- name: Package dist
shell: bash
run: |
ASSET="nexior-dist-${{ steps.meta.outputs.safe_tag }}.tar.gz"
tar -czf "$ASSET" dist
sha256sum "$ASSET" > "${ASSET}.sha256"

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.REPO_PAT || github.token }}
with:
tag_name: ${{ steps.meta.outputs.tag }}
name: v${{ steps.meta.outputs.version }}
generate_release_notes: true
files: |
nexior-dist-${{ steps.meta.outputs.safe_tag }}.tar.gz
nexior-dist-${{ steps.meta.outputs.safe_tag }}.tar.gz.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "update github release change",
"packageName": "@acedatacloud/nexior",
"email": "[email protected]",
"dependentChangeType": "patch"
}