Skip to content

Commit

Permalink
Created a release builder workflow (OpenMage#2165)
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Dec 17, 2022
1 parent e2c1169 commit 071cdcd
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 41 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release builder

on:
release:
types: [created]

jobs:
release_build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.3']
steps:
- name: Checkout repository
uses: actions/checkout@master

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Composer install
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-* --no-dev

- name: Create ZIP file
run: zip -rq openmage-${{ github.event.release.tag_name }}.zip . -x '.git/*'

- name: Attach ZIP to GitHub release
uses: svenstaro/upload-release-action@master
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: openmage-${{ github.event.release.tag_name }}.zip
tag: ${{ github.event.release.tag_name }}
overwrite: true
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@
"branch-alias": {
"dev-main": "1.9.4.x-dev"
},
"magento-root-dir": "."
"magento-root-dir": ".",
"magento-deploystrategy": "copy",
"magento-deploystrategy-dev": "symlink",
"magento-force": true
},
"config": {
"allow-plugins": {
Expand Down
128 changes: 88 additions & 40 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 071cdcd

Please sign in to comment.