Skip to content

Commit

Permalink
Merge pull request #2 from nephroflow/kv/fix-action-syntax
Browse files Browse the repository at this point in the history
action: syntax correction
  • Loading branch information
vdmkenny authored Mar 22, 2024
2 parents 768f1a8 + f9cc466 commit 4b323e3
Showing 1 changed file with 37 additions and 36 deletions.
73 changes: 37 additions & 36 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build RPM

on:
Expand All @@ -13,46 +14,46 @@ jobs:

build:
runs-on: ubuntu-latest

strategy:
matrix:
arch: [amd64, arm64]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.8

- name: Install Build Dependencies
run: |
sudo apt update
sudo apt install -y rpm make
- name: Build RPM - ${{ matrix.arch }}
run: |
# Get the release name
release_name=$(echo "${GITHUB_REF}" | awk -F'/' '{print $NF}')
# Extract the version from the release name
version=$(echo "${release_name}" | grep -oE "[0-9]+\.[0-9]+\.[0-9]+")
- name: Checkout Repository
uses: actions/checkout@v4

make build ARCH=${{ matrix.arch }} VERSION=${version}
make rpm ARCH=${{ matrix.arch }} VERSION=${version}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.8

- name: Upload RPMs to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
rpmbuild/RPMS/**/*.rpm
out/*
token: ${{ secrets.GITHUB_TOKEN }}

- name: Job fail
continue-on-error: true
run: |
make clean
- name: Install Build Dependencies
run: |
sudo apt update
sudo apt install -y rpm make
- name: Build RPM - ${{ matrix.arch }}
run: |
# Get the release name
release_name=$(echo "${GITHUB_REF}" | awk -F'/' '{print $NF}')
# Extract the version from the release name
version=$(echo "${release_name}" | grep -oE "[0-9]+\.[0-9]+\.[0-9]+")
make build ARCH=${{ matrix.arch }} VERSION=${version}
make rpm ARCH=${{ matrix.arch }} VERSION=${version}
- name: Upload RPMs to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
rpmbuild/RPMS/**/*.rpm
out/*
token: ${{ secrets.GITHUB_TOKEN }}

- name: Job fail
continue-on-error: true
run: |
make clean

0 comments on commit 4b323e3

Please sign in to comment.