📎 Add build tag workflow and minor changes

This commit is contained in:
Yamila Moreno
2025-08-20 10:51:05 +02:00
parent a6ecc4fb3c
commit 358343b4df
4 changed files with 31 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
name: Build and Upload Penpot Bundles
name: Build and Upload Penpot Bundle
on:
# Create bundle from manual action
@@ -11,8 +11,8 @@ on:
required: true
jobs:
build-bundles:
name: Build and Upload Penpot Bundles
build-bundle:
name: Build and Upload Penpot Bundle
runs-on: ubuntu-24.04
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -30,7 +30,7 @@ jobs:
id: vars
run: |
echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "gh_branch=${{ inputs.gh_ref }}" >> $GITHUB_OUTPUT
echo "gh_ref=${{ inputs.gh_ref }}" >> $GITHUB_OUTPUT
- name: Run manage.sh build-bundle from host
run: ./manage.sh build-bundle
@@ -40,16 +40,22 @@ jobs:
mkdir zips
mv bundles penpot
- name: Create zip bundles
- name: Create zip bundle
run: |
echo "📦 Packaging Penpot bundles..."
echo "📦 Packaging Penpot bundle..."
zip -r zips/penpot.zip penpot
- name: Upload Penpot bundle to S3
if: github.ref_type == 'branch'
run: |
aws s3 cp zips/penpot.zip s3://${{ secrets.S3_BUCKET }}/penpot-${{ steps.vars.outputs.gh_branch}}-latest.zip
aws s3 cp zips/penpot.zip s3://${{ secrets.S3_BUCKET }}/penpot-${{ steps.vars.outputs.gh_ref }}-latest.zip
aws s3 cp zips/penpot.zip s3://${{ secrets.S3_BUCKET }}/penpot-${{ steps.vars.outputs.commit_hash }}.zip
- name: Upload Penpot bundle to S3
if: github.ref_type == 'tag'
run: |
aws s3 cp zips/penpot.zip s3://${{ secrets.S3_BUCKET }}/penpot-${{ steps.vars.outputs.gh_ref }}.zip
- name: Notify Mattermost
if: failure()
uses: mattermost/action-mattermost-notify@master
@@ -57,5 +63,5 @@ jobs:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK }}
TEXT: |
❌ *[PENPOT] Error during the execution of the job*
📄 Triggered from ref: `${{ steps.vars.outputs.gh_branch}}`
📄 Triggered from ref: `${{ steps.vars.outputs.gh_ref }}`
🔗 Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

View File

@@ -1,4 +1,4 @@
name: Build and Upload Penpot DEVELOP Bundles
name: Build and Upload Penpot DEVELOP Bundle
on:
schedule:
@@ -6,7 +6,7 @@ on:
jobs:
build-develop-bundle:
uses: ./.github/workflows/build-bundles.yml
uses: ./.github/workflows/build-bundle.yml
secrets: inherit
with:
gh_ref: "develop"

View File

@@ -1,4 +1,4 @@
name: Build and Upload Penpot STAGING Bundles
name: Build and Upload Penpot STAGING Bundle
on:
schedule:
@@ -6,7 +6,7 @@ on:
jobs:
build-staging-bundle:
uses: ./.github/workflows/build-bundles.yml
uses: ./.github/workflows/build-bundle.yml
secrets: inherit
with:
gh_ref: "staging"

13
.github/workflows/build-tag.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: Build and Upload Penpot TAG Bundle
on:
push:
tags:
- '*'
jobs:
build-tag-bundle:
uses: ./.github/workflows/build-bundle.yml
secrets: inherit
with:
gh_ref: ${{ github.ref_name }}