mirror of
https://github.com/5rahim/seanime
synced 2026-04-25 22:34:56 +02:00
81 lines
1.7 KiB
YAML
81 lines
1.7 KiB
YAML
name: Release Draft
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
|
|
build-webapp:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# Web
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '18'
|
|
|
|
- name: Install dependencies and build Next.js app
|
|
run: |
|
|
cd seanime-web/
|
|
npm install
|
|
npm run build
|
|
- name: Archive web folder
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: web
|
|
path: seanime-web/web
|
|
|
|
create-release-draft:
|
|
runs-on: ubuntu-latest
|
|
needs: build-webapp
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Fetch all tags
|
|
run: git fetch --force --tags
|
|
|
|
# Download the web/ folder artifact
|
|
- name: Download web folder artifact
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: web
|
|
path: web
|
|
|
|
# Python
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- name: Generate Release Notes
|
|
run: python ./.github/scripts/generate-release-notes.py
|
|
|
|
# Go
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v5
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --clean --release-notes whats-new.md
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |