Allow other branches to run on push and pr #119
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
name: Build and Release | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ master ] | |
paths-ignore: | |
- '**.md' | |
env: | |
ver_num: "1.0.${{ github.run_number }}" | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Run Make | |
run: "VERSION=${{ env.ver_num }} make" | |
- name: Package deb file | |
run: "VERSION=${{ env.ver_num }} make package" | |
- name: Upload a Build Artifact - deb | |
uses: actions/upload-artifact@v4.1.0 | |
with: | |
name: "prompt_${{ env.ver_num }}.deb" | |
path: "package/prompt_${{ env.ver_num }}.deb" | |
if-no-files-found: error | |
retention-days: 90 | |
- name: Upload a Build Artifact - zip | |
uses: actions/upload-artifact@v4.1.0 | |
with: | |
name: "prompt_${{ env.ver_num }}" | |
path: "package/prompt_${{ env.ver_num }}.zip" | |
if-no-files-found: error | |
retention-days: 90 | |
- name: Create Release | |
uses: ncipollo/release-action@v1.13.0 | |
with: | |
artifactErrorsFailBuild: true | |
artifacts: "package/prompt_${{ env.ver_num }}.deb,package/prompt_${{ env.ver_num }}.zip" | |
commit: "${{ github.sha }}" | |
#draft: false | |
tag: "v${{ env.ver_num }}" | |
name: "v${{ env.ver_num }}" | |
token: ${{ github.token }} | |