Delete .github/workflows/release.yml

This commit is contained in:
Michel 2024-11-01 10:19:25 -04:00 committed by GitHub
parent 17379906fa
commit 40b4de8606
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,59 +0,0 @@
name: Build, Sign, and Release Plugin

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Generate Changelog
id: changelog
run: |
latest_tag=$(git describe --tags --abbrev=0)
changelog=$(git log ${latest_tag}..HEAD --pretty=format:"* %s: %b ([View Commit](https://github.com/${{ github.repository }}/commit/%H))" --no-merges)
echo "changelog=$changelog" >> $GITHUB_ENV

- name: Build Plugin Zip
run: zip -r slm-plus.zip . -x '*.git*' '*.github*'

- name: Import GPG Key
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
echo "$GPG_PRIVATE_KEY" | gpg --batch --import

- name: Sign Plugin Zip
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
echo "$GPG_PASSPHRASE" | gpg --batch --yes --passphrase-fd 0 --detach-sign -a slm-plus.zip

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./slm-plus.zip
asset_name: slm-plus.zip
asset_content_type: application/zip

- name: Upload Signature
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./slm-plus.zip.asc
asset_name: slm-plus.zip.asc
asset_content_type: application/pgp-signature

- name: Update Release Description
uses: octokit/request-action@v2.x
with:
route: PATCH /repos/${{ github.repository }}/releases/${{ github.event.release.id }}
release_id: ${{ github.event.release.id }}
description: |
## Changelog
${{ env.changelog }}