Skip to content

Commit

Permalink
tag commit
Browse files Browse the repository at this point in the history
  • Loading branch information
proton committed Nov 27, 2023
1 parent ed2073a commit 2b935af
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Extract version from package.json
run: |
export VERSION=$(grep 'version"' package.json | cut -d '"' -f 4)
echo "Release version is $VERSION"
echo "::set-env name=VERSION::$VERSION"
- name: Create tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: '${{ env.VERSION }}',
sha: context.sha
})
- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -22,20 +39,12 @@ jobs:
- name: Install dependencies
run: npm install

- name: Extract version from package.json
run: |
VERSION=$(grep 'version"' package.json | cut -d '"' -f 4)
echo "Release version is $VERSION"
echo "::set-env name=VERSION::$VERSION"
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
out/Kino.pub_${{ env.VERSION }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Release URL
run: |
Expand Down

0 comments on commit 2b935af

Please sign in to comment.