starter-kit/.github/workflows/release.yml
Cristopfer Luis Viana da Silva 775ad730b9 test: rpm release
2024-02-05 21:58:29 +00:00

66 lines
No EOL
1.9 KiB
YAML

# Create a GitHub upstream release. Replace "TARNAME" with your project tarball
# name and enable this by dropping the ".disabled" suffix from the file name.
# See README.md.
name: release
on:
push:
tags:
# this is a glob, not a regexp
- "*"
jobs:
source:
runs-on: ubuntu-latest
container:
image: ghcr.io/cockpit-project/unit-tests
options: --user root
permissions:
# create GitHub release
contents: write
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 0
# https://github.blog/2022-04-12-git-security-vulnerability-announced/
- name: Pacify git's permission check
run: git config --global --add safe.directory /__w/cockpit-sensors/cockpit-sensors
- name: Workaround for https://github.com/actions/checkout/pull/697
run: git fetch --force origin $(git describe --tags):refs/tags/$(git describe --tags)
- name: Build release
run: make dist
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: cockpit-sensors.tar.xz
asset_name: cockpit-sensors.tar.xz
tag: ${{ github.ref }}
- name: Build Deb release
run: make deb
- name: Upload Deb binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: cockpit-sensors.deb
asset_name: cockpit-sensors.deb
tag: ${{ github.ref }}
- name: Install RPM
run: apt install rpm
- name: Build RPM
run: make rpm
- name: Upload RPM binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: cockpit-sensors.rpm
asset_name: cockpit-sensors.rpm
tag: ${{ github.ref }}