Skip to content

Commit

Permalink
Update various actions in .github/workflows/release.yml
Browse files Browse the repository at this point in the history
Github says that some of the actions use deprecated APIs.
  • Loading branch information
totten committed Feb 8, 2023
1 parent 24388fb commit 7d3097f
Showing 1 changed file with 8 additions and 22 deletions.
30 changes: 8 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,23 @@ jobs:
echo RELEASE_VERSION=${GITHUB_REF:11} >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate

- name: Build PHAR
run: ./scripts/build.sh
run: ./scripts/build.sh && mv dist/loco.phar dist/loco-${{ env.RELEASE_VERSION }}.phar
continue-on-error: false

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
body: |
Changes in this Release
- First Change
- Second Change
draft: true
prerelease: false

- name: Upload PHAR
id: upload_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./dist/loco.phar
asset_name: loco-${{ env.RELEASE_VERSION }}.phar
asset_content_type: application/octet-stream
files: dist/loco-*.phar

0 comments on commit 7d3097f

Please sign in to comment.