Skip to content

Commit

Permalink
Merge pull request #111 from pacoorozco/add-release-workflow
Browse files Browse the repository at this point in the history
Fix github action 2
  • Loading branch information
pacoorozco authored Apr 11, 2020
2 parents 04fc7a5 + 1c86d29 commit 27b8ba9
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
env:
FILENAME: "gamify-laravel-${{ github.ref }}"

jobs:
build:
Expand All @@ -13,10 +11,16 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project # This would actually build your project, using zip for an example artifact
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build project
id: build_project
env:
COMPOSER_ARCHIVE_OPTIONS: "--file=$FILENAME"
run: composer build
COMPOSER_ARCHIVE_OPTIONS: --file=gamify-laravel-${{ steps.get_version.outputs.VERSION }}
run: |
composer build
echo ::set-output name=FILENAME::gamify-laravel-${{ steps.get_version.outputs.VERSION }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -34,6 +38,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/gamify-laravel-${{ github.ref }}.zip
asset_name: gamify-laravel-${{ github.ref }}.zip
asset_path: ./${{ steps.build_project.outputs.FILENAME }}.zip
asset_name: ${{ steps.build_project.outputs.FILENAME }}.zip
asset_content_type: application/zip

0 comments on commit 27b8ba9

Please sign in to comment.