-
Notifications
You must be signed in to change notification settings - Fork 25
57 lines (54 loc) · 1.64 KB
/
auto-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
name: Auto Release
on:
push:
branches:
- main
- auto-release
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node env 🏗
uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
- name: Bun Setup
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: INstall Dependencies
run: bun install
- name: Generate Static Website
run: |
BASE_URL=/~prose bun generate
mv .output/public static_website
tar -czvf static_website.tar.gz static_website
- name: Set Release Name
id: set_release_name
run: |
echo "RELEASE_NAME=$(date +'%Y-%m-%d %H:%M:%S')" >> "$GITHUB_OUTPUT"
echo "TAG_NAME=v$(date +'%Y-%m-%d-%H-%M-%S')" >> "$GITHUB_OUTPUT"
- name: Create Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.set_release_name.outputs.TAG_NAME }}
release_name: ${{ steps.set_release_name.outputs.RELEASE_NAME }}
draft: false
prerelease: false
- name: upload linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./static_website.tar.gz
asset_name: static_website.tar.gz
asset_content_type: application/gzip