Fetch and release #2
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: Fetch and release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Enter release version' | |
required: true | |
jobs: | |
release: | |
name: Create the release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to upload assets to releases | |
attestations: write # to upload assets attestation for build provenance | |
id-token: write # grant additional permission to attestation action to mint the OIDC token permission | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Fetch Deb packages | |
run: bash get-debs.sh "${{ github.event.inputs.version }}" | |
- name: Create the release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release create --title "${{ github.event.inputs.version }}" --generate-notes | |
- name: Upload packages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload "${{ github.event.inputs.version }}" *.deb | |
- name: Attest release files | |
id: attest | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: '*.deb' |