2023-09-30 18:35:50 +00:00
|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true # Fetch Hugo themes (true OR recursive)
|
|
|
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
|
|
|
|
2023-09-30 18:38:48 +00:00
|
|
|
- name: setup go
|
|
|
|
uses: https://github.com/actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: '>=1.20.1'
|
|
|
|
|
2023-09-30 18:35:50 +00:00
|
|
|
- name: Setup Hugo
|
|
|
|
uses: https://github.com/peaceiris/actions-hugo@v2
|
|
|
|
with:
|
|
|
|
hugo-version: '0.111.3'
|
|
|
|
# extended: true
|
|
|
|
|
|
|
|
- name: Build site
|
|
|
|
run: hugo --minify
|
|
|
|
|
|
|
|
- name: Create tarfile
|
|
|
|
run: tar -cf website.tar public
|
|
|
|
|
|
|
|
- name: Create relesase
|
|
|
|
id: create-release-action
|
|
|
|
uses: https://gitea.com/actions/release-action@main
|
|
|
|
with:
|
|
|
|
files: |-
|
|
|
|
website.tar
|
|
|
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|