This repository was archived by the owner on Apr 28, 2026. It is now read-only.
forked from overextended/ox_lib
-
-
Notifications
You must be signed in to change notification settings - Fork 120
100 lines (78 loc) · 2.55 KB
/
Copy pathrelease.yml
File metadata and controls
100 lines (78 loc) · 2.55 KB
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
name: Create release
on:
push:
tags:
- 'v*.*.*'
permissions:
id-token: write # Required for OIDC
contents: write
jobs:
create-release:
if: github.actor_id != 210085057
runs-on: ubuntu-latest
steps:
- name: Install zip
run: sudo apt install zip
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Generate GitHub App token
id: app_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Get latest code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}
token: ${{ steps.app_token.outputs.token }}
- name: Bump package version
run: bun run .github/actions/bump-package-version.js
env:
TGT_RELEASE_VERSION: ${{ github.ref_name }}
- name: Bump manifest version
run: bun run .github/actions/bump-manifest-version.js
env:
TGT_RELEASE_VERSION: ${{ github.ref_name }}
- name: Push version bump change
uses: EndBug/add-and-commit@v9
with:
add: '["fxmanifest.lua", "package/package.json"]'
push: true
default_author: github_actions
message: 'chore: bump version to ${{ github.ref_name }}'
- name: Install package dependencies
run: bun install --frozen-lockfile
working-directory: package
- name: Install web dependencies
run: bun install --frozen-lockfile
working-directory: web
- name: Run web build script
run: bun run build
working-directory: web
- name: Bundle files
run: |
mkdir -p ./temp/ox_lib/web
cp ./{LICENSE,README.md,fxmanifest.lua,init.lua} ./temp/ox_lib
cp -r ./{imports,resource,locales} ./temp/ox_lib
cp -r ./web/build ./temp/ox_lib/web/
cd ./temp && zip -r ../ox_lib.zip ./ox_lib
- name: Create release
uses: 'marvinpinto/action-automatic-releases@v1.2.1'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: ox_lib.zip
- name: Update tag
uses: EndBug/latest-tag@v1
with:
ref: ${{ github.ref_name }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Publish package to npm registry
run: npm publish --access public