From e889369059b32e1709e244eaa9b8c5ea32599a57 Mon Sep 17 00:00:00 2001 From: Matt Troutman Date: Sun, 21 Jul 2024 02:18:26 -0500 Subject: [PATCH] Adding github action to publish releases merged into main --- .github/workflows/publish-release.yml | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/publish-release.yml diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 0000000..1454e55 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,43 @@ +name: Publish Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Extract Version + id: extract_version + run: | + VERSION=$(grep 'Version:' clique.sfd | awk '{print $2}') + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Package Generated Fonts + run: | + zip -r generated-fonts.zip ./generated\ fonts/ + + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.VERSION }} + release_name: Release ${{ env.VERSION }} + draft: false + prerelease: false + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./generated-fonts.zip + asset_name: generated-fonts.zip + asset_content_type: application/zip \ No newline at end of file