Skip to content

Commit d1181d7

Browse files
committed
ci: add release workflow (#8)
1 parent b9a579f commit d1181d7

File tree

2 files changed

+43
-41
lines changed

2 files changed

+43
-41
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node Version 18
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '18.x'
22+
23+
- name: Install And Build
24+
run: |
25+
yarn --frozen-lockfile
26+
yarn build
27+
28+
- name: Get Version
29+
id: get_version
30+
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
31+
32+
- name: Package files
33+
run: |
34+
mv ./build ./navigation-website-${{ steps.get_version.outputs.VERSION }}
35+
tar -zcvf navigation-website-${{ steps.get_version.outputs.VERSION }}.tar.gz ./navigation-website-${{ steps.get_version.outputs.VERSION }}
36+
zip -r navigation-website-${{ steps.get_version.outputs.VERSION }}.zip ./navigation-website-${{ steps.get_version.outputs.VERSION }}
37+
38+
- name: Release
39+
uses: softprops/action-gh-release@v1
40+
if: startsWith(github.ref, 'refs/tags/')
41+
with:
42+
files: ./navigation-website-*
43+
draft: false

0 commit comments

Comments
 (0)