Release #47
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: 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/ghaction-import-gpg@v6.1.0 | |
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/action-automatic-releases@v1.2.1" | |
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 |