Deleted debug code. #7
Workflow file for this run
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: Automatic Release Creation | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
env: | |
PACKAGE_NAME: imgopt | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create derived env variables | |
run: | | |
echo "PACKAGE_PHAR_NAME=${{ env.PACKAGE_NAME }}.phar" >> $GITHUB_ENV | |
echo "PACKAGE_ZIP_NAME=${{ env.PACKAGE_NAME }}-x64-win.zip" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
ini-values: phar.readonly=Off | |
- name: Install Dependencies | |
run: composer install | |
- name: Execute build.php | |
run: php build.php | |
- name: Start gpg-agent | |
run: | | |
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV | |
echo "GPG_AGENT_INFO=$HOME/.gnupg/S.gpg-agent" >> $GITHUB_ENV | |
- name: Setup GPG | |
run: echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --batch --import - | |
- name: Setup trustdb | |
run: echo "${{ secrets.GPG_TRUSTDB }}" | base64 -d > $HOME/.gnupg/trustdb.gpg | |
- name: Sign the ${{ env.PACKAGE_PHAR_NAME }}.asc | |
run: gpg --batch --yes --pinentry-mode loopback -u ${{ secrets.EMAIL_NOREPLY_K4ZUKI02H4T4 }} --passphrase "${{ secrets.GPG_PASSPHRASE }}" --detach-sign --armor -o ${{ env.PACKAGE_PHAR_NAME }}.asc ${{ env.PACKAGE_PHAR_NAME }} | |
- name: Sign the ${{ env.PACKAGE_PHAR_NAME }}.gpg | |
run: gpg --batch --yes --pinentry-mode loopback -e -r ${{ secrets.EMAIL_NOREPLY_K4ZUKI02H4T4 }} --passphrase "${{ secrets.GPG_PASSPHRASE }}" -o ${{ env.PACKAGE_PHAR_NAME }}.gpg ${{ env.PACKAGE_PHAR_NAME }} | |
- name: Sign the ${{ env.PACKAGE_ZIP_NAME }}.asc | |
run: gpg --batch --yes --pinentry-mode loopback -u ${{ secrets.EMAIL_NOREPLY_K4ZUKI02H4T4 }} --passphrase "${{ secrets.GPG_PASSPHRASE }}" --detach-sign --armor -o ${{ env.PACKAGE_ZIP_NAME }}.asc ${{ env.PACKAGE_ZIP_NAME }} | |
- name: Sign the ${{ env.PACKAGE_ZIP_NAME }}.gpg | |
run: gpg --batch --yes --pinentry-mode loopback -e -r ${{ secrets.EMAIL_NOREPLY_K4ZUKI02H4T4 }} --passphrase "${{ secrets.GPG_PASSPHRASE }}" -o ${{ env.PACKAGE_ZIP_NAME }}.gpg ${{ env.PACKAGE_ZIP_NAME }} | |
- name: Release ${{ github.ref }} | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
generate_release_notes: true | |
files: | | |
${{ env.PACKAGE_PHAR_NAME }} | |
${{ env.PACKAGE_PHAR_NAME }}.* | |
${{ env.PACKAGE_ZIP_NAME }} | |
${{ env.PACKAGE_ZIP_NAME }}.* | |
- name: Trigger Scoop bucket repository action | |
run: | | |
curl -X POST \ | |
-H "Authorization: Bearer ${{ secrets.KALEIDPIXEL_ACTIONS_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/kaleidpixel/scoop-bucket/dispatches \ | |
-d '{"event_type": "trigger-event"}' | |
- name: Trigger Homebrew Formula repository action | |
run: | | |
curl -X POST \ | |
-H "Authorization: Bearer ${{ secrets.KALEIDPIXEL_ACTIONS_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/kaleidpixel/homebrew-cli/dispatches \ | |
-d '{"event_type": "trigger-event"}' |