-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (111 loc) · 3.92 KB
/
laravel-one-release.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: laravel-one-release
on:
release:
types: [ created ]
env:
php_version: 8.3
node_version: lts/iron
jobs:
publish-binaries:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./builds
permissions:
contents: write
concurrency:
group: laravel-one-publish-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get current release tag
id: branch-name
run: echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: add assets to release
run: |
sha512sum laravel-one > laravel-one.sha512sum
gh release upload ${{ steps.branch-name.outputs.SOURCE_TAG }} laravel-one.sha512sum
gh release upload ${{ steps.branch-name.outputs.SOURCE_TAG }} laravel-one
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-docs:
runs-on: ubuntu-latest
concurrency:
group: laravel-one-ghpages-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Publish to wiki
uses: SwiftDocOrg/github-wiki-publish-action@v1
with:
path: "docs"
env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.ABENEVAUT_GITHUB_TOKEN }}
publish-pages:
runs-on: ubuntu-latest
concurrency:
group: laravel-one-ghpages-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
working-directory:
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ env.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.node_version }}
registry-url: https://npm.pkg.github.com
- name: Configure Node.js cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-nodejs_${{ env.node_version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-nodejs_${{ env.node_version }}-
- name: Setup NPM
run: |
npm config set "@abenevaut:registry" https://npm.pkg.github.com/
npm config set "//npm.pkg.github.com/:_authToken" $NODE_AUTH_TOKEN
env:
NODE_AUTH_TOKEN: ${{ secrets.ABENEVAUT_GITHUB_TOKEN }}
- name: NPM install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: npm ci --prefer-offline --no-audit --progress=false
- name: Initialize PHP ${{ env.php_version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php_version }}
- name: Configure Composer cache
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-node-php_${{ env.php_version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-node-php_${{ env.php_version }}-
- name: Composer install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install -o --no-interaction --prefer-dist
- name: Web pages cache
id: web-pages-cache
uses: actions/cache@v4
with:
path: .cache
key: ${{ runner.os }}-pages-cache-php_${{ env.php_version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-pages-cache-php_${{ env.php_version }}-${{ hashFiles('**/composer.json') }}
- name: Generate static pages
run: php laravel-one generate https://laravel-one.abenevaut.dev
- uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.ABENEVAUT_GITHUB_TOKEN }}
branch: gh-pages
folder: dist