38 lines
979 B
YAML
38 lines
979 B
YAML
name: Release
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read # for checkout
|
|
|
|
jobs:
|
|
release:
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # to be able to publish a GitHub release
|
|
issues: write # to be able to comment on released issues
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Determine release version and changelog
|
|
run: npx commit-and-tag-version
|
|
|
|
- name: Build release
|
|
working-directory: src
|
|
run: |
|
|
VERSION=$(jq '.version' info.json | xargs echo -n)
|
|
zip -r ../prometheus-exporter_$VERSION.zip .
|
|
|
|
- name: Push changelog and tag
|
|
run: git push --follow-tags
|
|
|
|
- name: Create release
|
|
uses: akkuman/gitea-release-action@v1
|
|
with:
|
|
files: prometheus-exporter_*.zip
|
|
body_path: CHANGELOG.md
|
|
tag_name: $(git describe --tags --abbrev=0 | xargs echo -n)
|
|
md5sum: true
|