-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trivial: Add a workflow for automatically releasing a binary on tag e…
…vent
- Loading branch information
Showing
3 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
name: build | ||
|
||
name: Build Workflow | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
deb: ${{ steps.package.outputs.deb }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: deps | ||
run: | | ||
sudo apt update | ||
sudo apt install debhelper dpkg-dev -y | ||
- name: package | ||
id: package | ||
run: | | ||
mkdir -p tmp | ||
cd tmp && \ | ||
ln -s ../fwupd-wrapper ../debian . && \ | ||
dpkg-buildpackage -us -uc | ||
echo "deb=$(ls *.deb)" >> $GITHUB_OUTPUT | ||
- name: Capture artifacts | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: debian package | ||
name: debian | ||
path: | | ||
*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
ci: | ||
uses: ./.github/workflows/build.yaml | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Tag | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
|
||
tag: | ||
name: Tag Release | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
id: download | ||
with: | ||
name: debian | ||
|
||
- name: Release the Package | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ needs.build.outputs.deb }} |