Tweak workflows
This commit is contained in:
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@@ -4,6 +4,9 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -24,7 +27,7 @@ jobs:
|
|||||||
- name: Upload entire repository as zip
|
- name: Upload entire repository as zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: psfree-lapse-archive
|
name: psfree-lapse
|
||||||
path: ${{ github.workspace }}
|
path: ${{ github.workspace }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
compression-level: 9
|
compression-level: 9
|
||||||
|
|||||||
36
.github/workflows/release.yml
vendored
Normal file
36
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: Build release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*' # Only run when a tag like v1.0, v2.1.3, etc. is pushed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: src/kpatch
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install build tools
|
||||||
|
run: sudo apt-get update && sudo apt-get install -y build-essential
|
||||||
|
|
||||||
|
- name: Build kpatch binaries
|
||||||
|
run: make
|
||||||
|
|
||||||
|
- name: Archive repository
|
||||||
|
run: |
|
||||||
|
cd $GITHUB_WORKSPACE
|
||||||
|
VERSION="${GITHUB_REF##*/}"
|
||||||
|
VERSION="${VERSION#v}"
|
||||||
|
zip -r -9 "psfree-lapse-${VERSION}.zip" .
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: psfree-lapse-*.zip
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in New Issue
Block a user