-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (63 loc) · 1.71 KB
/
release.yml
File metadata and controls
76 lines (63 loc) · 1.71 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
name: Create Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version Format: x.y.z-[alpha|beta|pre].n'
required: true
release_name:
description: 'Release title'
required: true
release_notes:
description: 'Release notes or changelog'
required: true
prerelease:
description: 'Is this a pre-release?'
required: false
default: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Test code
run: bun test
- name: Build Nuxt application
run: bun run build
- name: Create Archive of .output
run: |
tar -czf app.tar.gz .output
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: app
path: ./app.tar.gz
retention-days: 1 # Set to 1 day for temporary storage
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: app
- name: Create GitHub Release
id: create_release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ github.event.inputs.version }}
name: ${{ github.event.inputs.release_name }}
body: ${{ github.event.inputs.release_notes }}
prerelease: ${{ github.event.inputs.prerelease }}
artifacts: ./app.tar.gz