Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Nov 17, 2022
1 parent a2f0b1a commit 00c3e6d
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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 @@ -21,7 +21,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 @@ -43,7 +43,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 @@ -53,7 +53,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 @@ -69,7 +69,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 @@ -78,7 +78,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 @@ -94,7 +94,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2

Expand All @@ -105,7 +105,7 @@ jobs:
coverage: pcov

- 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 @@ -126,20 +126,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 00c3e6d

Please sign in to comment.