Create release.yml

builds the release binaries from any branch besides the main one
This commit is contained in:
c2m 2023-05-05 07:45:22 +00:00 committed by GitHub
parent 9de8d6153d
commit 03bf578c44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

26
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: Release
on:
push:
paths-ignore:
- 'docs/**'
- 'scripts/**'
- 'README.md'
branches: [ "!main" ]
pull_request:
branches: [ "!main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT
id: extract_branch
- uses: actions/checkout@v3
- run: cd nevmes/ && ./scripts/build_release.sh ${{ steps.extract_branch.outputs.branch }}
- uses: actions/upload-artifact@v3
with:
name: release
path: nevmes/nevmes-x86_64-linux-gnu-v${{ steps.extract_branch.outputs.branch }}