Skip to content

Commit 553996d

Browse files
committed
test auto release
1 parent 25ff577 commit 553996d

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
.github/workflows/* -export-ignore

.github/workflows/auto_release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Auto Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Extract version from tag
18+
run: |
19+
VERSION=${GITHUB_REF#refs/tags/v}
20+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
21+
22+
- name: Create release zip archive
23+
run: |
24+
zip -r zrlong_v${{ env.VERSION }}.zip . -x ".*" -x "*/.*"
25+
26+
- name: Upload Release File
27+
uses: softprops/action-gh-release@v2
28+
if: startsWith(github.ref, 'refs/tags/')
29+
with:
30+
tag_name: ${{ github.ref }}
31+
name: zrlong_v${{ env.VERSION }}
32+
files: zrlong_v${{ env.VERSION }}.zip
33+
body_path: ./release.md

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
.github/

0 commit comments

Comments
 (0)