Skip to content

Commit a229fe5

Browse files
committed
Add GitHub Actions
1 parent 368ac3d commit a229fe5

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Package carbonfly source bundle
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
package:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Define zip name
19+
id: name
20+
run: |
21+
ZIP="carbonfly_src_${GITHUB_REF_NAME}.zip"
22+
echo "zip=${ZIP}" >> "$GITHUB_OUTPUT"
23+
24+
- name: Make zip
25+
run: |
26+
git archive \
27+
--format=zip \
28+
--output "${{ steps.name.outputs.zip }}" \
29+
HEAD \
30+
carbonfly \
31+
grasshopper/UserObjects \
32+
CHANGELOG.md \
33+
HowToInstall.md \
34+
LICENSE \
35+
README.md
36+
37+
- name: Upload to GitHub Release
38+
if: github.ref_type == 'tag'
39+
uses: softprops/action-gh-release@v2
40+
with:
41+
files: ${{ steps.name.outputs.zip }}
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)