-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (59 loc) · 1.7 KB
/
release.yml
File metadata and controls
72 lines (59 loc) · 1.7 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
name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
matrix:
os: [ubuntu-latest]
node: [22]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Cache bun
uses: actions/cache@v4
with:
path: |
~/.bun
~/.cache/bun
node_modules
key: bun-${{ runner.os }}-${{ hashFiles('bun.lockb') }}
restore-keys: |
bun-${{ runner.os }}-
- name: Install bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Generate reports
run: bun run generate-reports
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NUXT_PUBLIC_ASSET_KEY: ${{ secrets.NUXT_PUBLIC_ASSET_KEY }}
- name: Build
run: bun run generate
env:
NUXT_PUBLIC_SITE_URL: ${{ secrets.NUXT_PUBLIC_SITE_URL }}
NUXT_PUBLIC_ASSET_KEY: ${{ secrets.NUXT_PUBLIC_ASSET_KEY }}
- name: Package
run: |
PACKAGE_NAME=$(jq -r '.name' package.json)
PACKAGE_VERSION=$(jq -r '.version' package.json)
cd dist
tar -czvf ../$PACKAGE_NAME-$PACKAGE_VERSION.tar.gz .
zip -r ../$PACKAGE_NAME-$PACKAGE_VERSION.zip .
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: bun release
- name: Deploy
run: bun run ftp:site:push --force
env:
REMOTE_CONNECTION: ${{ secrets.REMOTE_CONNECTION }}