π test workflow #7
Workflow file for this run
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 package | |
on: | |
push: | |
# Pattern matched against refs/tags | |
tags: | |
- "**" # Push events to every tag including hierarchical tags like v1.0/beta | |
jobs: | |
create_release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref_name }} | |
run: | | |
gh release create "${{ github.ref_name }}" \ | |
--repo="$GITHUB_REPOSITORY" \ | |
--title="${{ github.ref_name }}" \ | |
--generate-notes | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install dependencies | |
run: sudo apt -y install rubygems && sudo gem install fpm && sudo apt install binutils | |
- name: Clear build directory | |
run: rm -rf ./build/ | |
- name: Build | |
run: NIGHTLY=vmonitor make package include_packages="amd64.deb" | |
- name: Debug | |
run: ls -al ./build/dist/ | |
- name: Upload files to a GitHub release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref_name }} | |
run: for file in ./build/dist/*; do gh release upload "${{ github.ref_name }}" "$file" --repo="$GITHUB_REPOSITORY"; done | |