|
1 |
| -name: Release |
| 1 | +name: Build |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
5 | 5 | tags:
|
6 |
| - - 'v*' |
| 6 | + - 'v*.*.*' |
7 | 7 |
|
8 | 8 | jobs:
|
9 | 9 | create-release:
|
10 |
| - name: Build and Create Tagged Release |
| 10 | + name: Build and Create Tagged release |
11 | 11 | runs-on: ubuntu-latest
|
| 12 | + |
12 | 13 | steps:
|
13 | 14 | - name: Install archive tools
|
14 | 15 | run: sudo apt install zip
|
15 | 16 |
|
16 |
| - - uses: actions/checkout@v2 |
| 17 | + - name: Checkout source code |
| 18 | + uses: actions/checkout@v2 |
17 | 19 | with:
|
18 | 20 | fetch-depth: 0
|
19 |
| - ref: ${{ github.ref }} |
20 |
| - |
| 21 | + ref: ${{ github.event.repository.default_branch }} |
| 22 | + |
| 23 | + - name: Install pnpm |
| 24 | + |
21 | 25 | with:
|
22 | 26 | version: 6.20.3
|
23 | 27 |
|
| 28 | + - name: Get variables |
| 29 | + id: get_vars |
| 30 | + run: | |
| 31 | + echo '::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)' |
| 32 | + echo '::set-output name=DATE::$(date +'%D')' |
| 33 | +
|
24 | 34 | - name: Setup node
|
25 | 35 | uses: actions/setup-node@v2
|
26 | 36 | with:
|
27 | 37 | node-version: 16.x
|
28 | 38 | cache: 'pnpm'
|
29 |
| - |
30 |
| - - name: Set env |
31 |
| - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
| 39 | + cache-dependency-path: 'pnpm-lock.yaml' |
32 | 40 |
|
33 | 41 | - name: Install dependencies
|
34 | 42 | run: pnpm i
|
35 | 43 |
|
36 | 44 | - name: Run build
|
37 | 45 | run: pnpm build
|
38 | 46 |
|
| 47 | + - name: Bump manifest version |
| 48 | + run: node .github/actions/bump-manifest-version.js |
| 49 | + env: |
| 50 | + TGT_RELEASE_VERSION: ${{ github.ref_name }} |
| 51 | + |
| 52 | + - name: Push manifest change |
| 53 | + uses: EndBug/add-and-commit@v8 |
| 54 | + with: |
| 55 | + add: fxmanifest.lua |
| 56 | + push: true |
| 57 | + author_name: Manifest Bumper |
| 58 | + author_email: 41898282+github-actions[bot]@users.noreply.github.com |
| 59 | + message: 'chore: bump manifest version to ${{ github.ref_name }}' |
| 60 | + |
| 61 | + - name: Update tag ref |
| 62 | + uses: EndBug/latest-tag@latest |
| 63 | + with: |
| 64 | + tag-name: ${{ github.ref_name }} |
| 65 | + |
39 | 66 | - name: Bundle files
|
40 | 67 | run: |
|
41 | 68 | mkdir -p ./temp/oxmysql
|
|
52 | 79 | id: auto_release
|
53 | 80 | with:
|
54 | 81 | repo_token: '${{ secrets.GITHUB_TOKEN }}'
|
55 |
| - title: ${{ env.RELEASE_VERSION }} |
| 82 | + title: '${{ env.RELEASE_VERSION }}' |
56 | 83 | prerelease: false
|
57 | 84 | files: oxmysql.zip
|
58 | 85 |
|
|
0 commit comments