-
-
Notifications
You must be signed in to change notification settings - Fork 35
54 lines (47 loc) · 1.26 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Build Release
on:
push:
branches:
- 'release'
jobs:
wordpress:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
ini-file: development
env:
fail-fast: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Debugging
run: |
php --version
composer --version
- name: Generate autoload file
run: ./bin/build.sh
- name: Setup
run: >
echo VERSION=$(node -p "require('./package.json').version") >> $GITHUB_ENV
- name: Tag
run: |
echo "Releasing version $VERSION ..."
git config user.name github-actions
git config user.email [email protected]
git checkout -b "release-$VERSION"
git add -f vendor/autoload.php
git add -f vendor/composer/*
git commit -m "Release $VERSION"
git tag "$VERSION"
git push --tags
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}