Skip to content

Commit

Permalink
github: add release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
blocktrron committed Jul 23, 2024
1 parent bcd11e7 commit 999c7be
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set package version
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: |
sed -i "s/PKG_VERSION:=.*/PKG_VERSION=${GITHUB_REF_NAME}-${{ matrix.release }}/g" openwrt/ffda-oob-state-reporter/Makefile
- name: Build
uses: openwrt/gh-action-sdk@v7
env:
Expand All @@ -27,3 +31,29 @@ jobs:
with:
name: ${{ matrix.arch}}-${{ matrix.release }}-packages
path: bin/packages/${{ matrix.arch }}/packages_ci/*.ipk

release:
name: Release package
runs-on: ubuntu-24.04
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: "gha-data/artifact-download"
- name: Show directory structure
run: |
find ./gha-data/artifact-download
- name: Combine artifacts
run: |
mkdir -p gha-data/artifact-release
find ./gha-data/artifact-download -type f -exec cp -t gha-data/artifact-release "{}" \+
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
body: ${{ github.ref_name }}
files: |
gha-data/artifact-release/*

0 comments on commit 999c7be

Please sign in to comment.