Skip to content

Merge pull request #10 from shuiblue/main #23

Merge pull request #10 from shuiblue/main

Merge pull request #10 from shuiblue/main #23

Workflow file for this run

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