Skip to content

Commit d17aae5

Browse files
First Release?
1 parent 77e05b0 commit d17aae5

File tree

1 file changed

+42
-6
lines changed

1 file changed

+42
-6
lines changed

.github/workflows/push.yml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
permissions:
1717
actions: read
18-
contents: read
18+
contents: write
1919
security-events: write
2020
strategy:
2121
fail-fast: false
@@ -48,20 +48,56 @@ jobs:
4848
- name: Run tests
4949
run: ctest
5050

51-
- name: Perform CodeQL Analysis
52-
uses: github/codeql-action/analyze@v1
53-
5451
- name: Build deb package
5552
run: sh packaging/deb/create.sh .
5653

54+
- name: Perform CodeQL Analysis
55+
uses: github/codeql-action/analyze@v1
56+
5757
- name: Upload binary
58-
uses: actions/upload-artifact@v2
58+
if: ${{ github.event_name == "push" }}
59+
uses: actions/upload-artifact@v3
5960
with:
6061
name: fastfetch
6162
path: ./fastfetch
6263

6364
- name: Upload deb package
64-
uses: actions/upload-artifact@v2
65+
if: ${{ github.event_name == "push" }}
66+
uses: actions/upload-artifact@v3
6567
with:
6668
name: fastfetch.deb
6769
path: ./packaging/deb/fastfetch.deb
70+
71+
deploy:
72+
name: "Create GitHub release"
73+
runs-on: ubuntu-latest
74+
needs: check
75+
if: ${{ github.event_name == "push" }}
76+
steps:
77+
- name: "Download binary"
78+
uses: actions/download-artifact@v3
79+
with:
80+
name: fastfetch
81+
path: ./fastfetch
82+
83+
- name: "Download deb package"
84+
uses: actions/download-artifact@v3
85+
with:
86+
name: fastfetch.deb
87+
path: ./fastfetch.deb
88+
89+
- name: "Get latest release version"
90+
id: get_version
91+
uses: pozetroninc/github-action-get-latest-release@master
92+
with:
93+
repository: ${{ github.repository }}
94+
95+
- name: "Create GitHub release"
96+
if: steps.get_version.outputs.release != $(./fastfetch --version)
97+
uses: softprops/action-gh-release@v1
98+
with:
99+
tag_name: ${{ $(./fastfetch --version) }}
100+
generate_release_notes: true
101+
files: |
102+
./fastfetch
103+
./fastfetch.deb

0 commit comments

Comments
 (0)