Skip to content

Commit f9cc466

Browse files
committed
syntax correction
1 parent 768f1a8 commit f9cc466

File tree

1 file changed

+37
-36
lines changed

1 file changed

+37
-36
lines changed

.github/workflows/release.yaml

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Build RPM
23

34
on:
@@ -13,46 +14,46 @@ jobs:
1314

1415
build:
1516
runs-on: ubuntu-latest
16-
17+
1718
strategy:
1819
matrix:
1920
arch: [amd64, arm64]
2021

2122
steps:
22-
- name: Checkout Repository
23-
uses: actions/checkout@v4
24-
25-
- name: Set up Go
26-
uses: actions/setup-go@v5
27-
with:
28-
go-version: 1.21.8
29-
30-
- name: Install Build Dependencies
31-
run: |
32-
sudo apt update
33-
sudo apt install -y rpm make
34-
35-
- name: Build RPM - ${{ matrix.arch }}
36-
run: |
37-
# Get the release name
38-
release_name=$(echo "${GITHUB_REF}" | awk -F'/' '{print $NF}')
39-
40-
# Extract the version from the release name
41-
version=$(echo "${release_name}" | grep -oE "[0-9]+\.[0-9]+\.[0-9]+")
23+
- name: Checkout Repository
24+
uses: actions/checkout@v4
4225

43-
make build ARCH=${{ matrix.arch }} VERSION=${version}
44-
make rpm ARCH=${{ matrix.arch }} VERSION=${version}
26+
- name: Set up Go
27+
uses: actions/setup-go@v5
28+
with:
29+
go-version: 1.21.8
4530

46-
- name: Upload RPMs to Release
47-
uses: softprops/action-gh-release@v2
48-
if: startsWith(github.ref, 'refs/tags/')
49-
with:
50-
files: |
51-
rpmbuild/RPMS/**/*.rpm
52-
out/*
53-
token: ${{ secrets.GITHUB_TOKEN }}
54-
55-
- name: Job fail
56-
continue-on-error: true
57-
run: |
58-
make clean
31+
- name: Install Build Dependencies
32+
run: |
33+
sudo apt update
34+
sudo apt install -y rpm make
35+
36+
- name: Build RPM - ${{ matrix.arch }}
37+
run: |
38+
# Get the release name
39+
release_name=$(echo "${GITHUB_REF}" | awk -F'/' '{print $NF}')
40+
41+
# Extract the version from the release name
42+
version=$(echo "${release_name}" | grep -oE "[0-9]+\.[0-9]+\.[0-9]+")
43+
44+
make build ARCH=${{ matrix.arch }} VERSION=${version}
45+
make rpm ARCH=${{ matrix.arch }} VERSION=${version}
46+
47+
- name: Upload RPMs to Release
48+
uses: softprops/action-gh-release@v2
49+
if: startsWith(github.ref, 'refs/tags/')
50+
with:
51+
files: |
52+
rpmbuild/RPMS/**/*.rpm
53+
out/*
54+
token: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Job fail
57+
continue-on-error: true
58+
run: |
59+
make clean

0 commit comments

Comments
 (0)