Skip to content

Update ci.yml

Update ci.yml #11

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
- name: Install build tools
run: sudo apt-get update && sudo apt-get install debhelper build-essential devscripts pkg-config libargon2-dev -y
env:
DEBIAN_FRONTEND: noninteractive
- name: Release package
run: |+
TAG=${{ github.ref_name }}
make package_build TAG="-t ${TAG}" DIST="-d jammy"
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: 'sectpmctl',
version: '${{ matrix.version }}',
tag: '${{ github.ref_name }}'
}
});
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json