-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 1.73 KB
/
release.yaml
File metadata and controls
73 lines (61 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Release
on:
release:
types:
- published
- edited
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Fix post run npm cleanup
run: mkdir -p /home/runner/.npm; touch /home/runner/package-lock.json
continue-on-error: true
- uses: actions/setup-node@v6
with:
node-version: 14
cache: 'npm'
- name: Install dependencies
run: |
sudo npm install -g coffeescript@1.12.7
- name: Install golang
uses: actions/setup-go@v6
with:
go-version: "1.23"
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- name: Extract repository name
run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
shell: bash
- name: Set zip file env name
run: echo "ZIP_NAME=${{env.REPOSITORY_NAME}}.zip" >> $GITHUB_ENV
- name: Build and Package
shell: bash
run: make zip
- name: Release
uses: softprops/action-gh-release@v3
with:
name: Release ${{ steps.get_version.outputs.VERSION }}
draft: true
generate_release_notes: true
files: |
build/${{ env.ZIP_NAME }}
README.md
test_release:
if: "!github.event.release.prerelease"
needs: build
runs-on: ubuntu-latest
steps:
- run: echo "real release"
test_prerelease:
if: "github.event.release.prerelease"
needs: build
runs-on: ubuntu-latest
steps:
- run: echo "pre-release"