Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Aug 25, 2023
1 parent 67d03bc commit 88f5249
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
Expand All @@ -22,7 +22,7 @@ jobs:
coverage: none

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache/composer
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
Expand All @@ -55,7 +55,7 @@ jobs:
tools: cs2pr

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache/composer
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -71,20 +71,15 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }} # Otherwise our annotated tag is not fetched and we cannot get correct version

# Create release
- name: Get release info
id: release-info
run: |
echo "::set-output name=subject::$(git tag --format '%(contents:subject)' --points-at)"
git tag --format '%(contents:body)' --points-at > release-body.txt
- uses: actions/create-release@v1
run: git tag --format '%(contents:body)' --points-at > release-body.txt

- uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.release-info.outputs.subject }}
body_path: release-body.txt
bodyFile: release-body.txt

0 comments on commit 88f5249

Please sign in to comment.