Skip to content

Release

Release #45

name: Release
on:
workflow_run:
workflows: [Test]
types:
- completed
branches:
- main
jobs:
release:
runs-on: "ubuntu-latest"
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event_name == 'create' && github.event.ref_type == 'tag' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Import GPG key
uses: crazy-max/[email protected]
with:
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}"
passphrase: "${{ secrets.GPG_PASSPHRASE }}"
- name: "Archive zram-config"
run: |
export tag="${{ github.ref_name }}"
sudo apt-get install lzip
git archive --format=tar --prefix=zram-config-${tag}/ ${tag} -o zram-config-${tag}.tar
lzip -9 --keep --verbose --verbose zram-config-${tag}.tar
gpg --detach-sign --armor zram-config-${tag}.tar.lz
gpg --verify zram-config-${tag}.tar.lz.asc zram-config-${tag}.tar.lz
unset tag
shell: bash
- uses: "marvinpinto/[email protected]"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
title: "${{ github.ref_name }}"
automatic_release_tag: "${{ github.ref_name }}"
prerelease: false
files: |
zram-config-*.tar.lz
zram-config-*.tar.lz.asc