Skip to content

Commit

Permalink
Added testing release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
L3RAZ committed Feb 6, 2025
1 parent bdb02f7 commit 4d33012
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy to Production

on:
release:
types: [created, edited, released]
tags:
- v8.*

jobs:
push-to-repository:
name: PRODUCTION - Create module zip
strategy:
fail-fast: false
uses: ./.github/workflows/push-to-repository.yml
with:
env-upper: PRODUCTION
env-lower: production
triggered: true
zip-name: ${{ github.event.repository.name }}.zip
repository-name: ${{ github.event.repository.name }}
secrets: inherit

update-release-draft:
name: PRODUCTION - Update release draft
runs-on: ubuntu-latest
environment: production
permissions:
id-token: write
contents: write
pull-requests: write
env:
ZIP_NAME: ${{ github.event.repository.name }}.zip

steps:
- name: Download artifact 🚚
uses: actions/download-artifact@v4
with:
name: ${{ env.ZIP_NAME }}

- name: Prepare zip for release 👷
run: |
cd ${{ inputs.repository-name }}
zip -r ../${{ env.ZIP_NAME }} . -x '*.DS_Store*' '*.git*' '*/.php_cs.*' '*__MACOSX*' '*/node_modules' '*/.npmrc' '*/composer.*' '*/package.*' '*/.editorconfig' '*_dev*' '*test*' '*/tests/*' '*/Test/*' '*/Tests/*' '*/gha-creds-*.json'
- name: Publish to GitHub Release 🛩️
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ env.ZIP_NAME }}
asset_name: ${{ env.ZIP_NAME }}
asset_content_type: application/zip

0 comments on commit 4d33012

Please sign in to comment.