Skip to content

Commit

Permalink
Add GitHub Action to automate releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
octo committed Feb 22, 2024
1 parent ca6f759 commit e115d92
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Publish Release

on:
workflow_dispatch:
inputs:
version:
description: 'Version Number'
required: true
type: string
download_url:
description: 'Download URL'
required: true
type: string
sha256sum:
description: 'SHA-256 checksum'
required: true
type: string

jobs:
collectd6:
if: ${{ startsWith(inputs.version, '6.') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update data file
run: |
cat >_data/collectd6.yml <<EOF
version: ${{ inputs.version }}
url: "${{ inputs.url }}"
sha256: ${{ inputs.sha256sum }}
EOF
git add _data/collectd6.yml
- name: Commit data file
run: |
git config --global user.name 'collectd bot'
git config --global user.email '[email protected]'
git commit -am "Bump collectd6 to ${{ inputs.version }}"
git push

0 comments on commit e115d92

Please sign in to comment.