Skip to content

Update release.yml

Update release.yml #4

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Fetch Tags
run: git fetch --force --tags
- name: Install build tools
run: sudo apt-get update && sudo apt-get install debhelper build-essential devscripts gcc-multilib binutils-dev pkg-config uuid-dev help2man gnu-efi -y
env:
DEBIAN_FRONTEND: noninteractive
- name: Build package
run: |+
TAG=${{ github.ref_name }}
debuild -i -uc -us -b
cd ..
echo "Result: $(ls *.deb)"
sha256sum *.deb > checksums.txt
sha512sum *.deb > checksums512.txt
cd ${{ github.workspace }}
gh release delete $TAG || true
gh release create $TAG --generate-notes ../*.deb ../checksums.txt ../checksums512.txt
env:
GH_TOKEN: ${{ github.token }}
deploy:
needs: release
runs-on: ubuntu-22.04
strategy:
matrix:
version: [jammy] # add others, if same package should be available in many versions
steps:
- name: Deploy
uses: actions/github-script@v6
with:
github-token: ${{ secrets.PULL_TOKEN }}
script: |+
github.rest.actions.createWorkflowDispatch({
owner: 'telekom-mms',
repo: 'linux-apt',
workflow_id: 'do_pull.yml',
ref: 'main',
inputs: {
repo: 'tpmsbsigntool',
version: '${{ matrix.version }}',
tag: '${{ github.ref_name }}'
}
});
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json