Skip to content

Commit 8e698c8

Browse files
committed
Use main
1 parent 15feb78 commit 8e698c8

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
name: CI
1+
name: Build and Release
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [main]
66
pull_request:
7-
branches: [ master ]
7+
branches: [main]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Set up Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: '3.x'
20-
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install -r requirements.txt
25-
26-
- name: Build
27-
run: make build
28-
29-
- name: Release with incremented version
30-
if: github.ref == 'refs/heads/master'
31-
run: |
32-
VERSION=$(cat version.txt 2>/dev/null || echo "1")
33-
echo $((VERSION + 1)) > version.txt
34-
tar -czf release-v${VERSION}.tar.gz release/
35-
git config --local user.email "action@github.com"
36-
git config --local user.name "GitHub Action"
37-
git add version.txt
38-
git commit -m "Bump version to $((VERSION + 1))"
39-
git push
40-
41-
- name: Upload release artifact
42-
if: github.ref == 'refs/heads/master'
43-
uses: actions/upload-artifact@v3
44-
with:
45-
name: release
46-
path: release-v*.tar.gz
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.x"
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
26+
- name: Build
27+
run: make build
28+
29+
- name: Release with incremented version
30+
if: github.ref == 'refs/heads/main'
31+
run: |
32+
VERSION=$(cat version.txt 2>/dev/null || echo "1")
33+
echo $((VERSION + 1)) > version.txt
34+
tar -czf release-v${VERSION}.tar.gz release/
35+
git config --local user.email "action@github.com"
36+
git config --local user.name "GitHub Action"
37+
git add version.txt
38+
git commit -m "Bump version to $((VERSION + 1))"
39+
git push
40+
41+
- name: Upload release artifact
42+
if: github.ref == 'refs/heads/main'
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: release
46+
path: release-v*.tar.gz

0 commit comments

Comments
 (0)