-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (32 loc) · 1.04 KB
/
Copy pathrelease.yml
File metadata and controls
39 lines (32 loc) · 1.04 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
name: Create Release and Upload Asset
on:
push:
tags:
- 'v*.*.*'
jobs:
build_and_upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get tag version
id: get_version
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Set version
run: bash scripts/update_version.sh
- name: Zip static files
run: zip -r static-${{ env.TAG }}.zip static/
- name: Generate release notes (from remote script)
shell: bash
run: |
set -euo pipefail
curl -fsSL "https://raw.githubusercontent.com/chenxuan520/gh-action-shell/main/git_commit_message_from_last_tag.sh" | bash 1>commit-message.log 2>/dev/null
- name: Create GitHub Release and Upload Asset
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: commit-message.log
files: |
static-${{ env.TAG }}.zip