2024-03-26 20:31:02 +00:00
|
|
|
name: Release and Deploy
|
|
|
|
|
|
|
|
on:
|
2024-06-22 18:18:41 +00:00
|
|
|
workflow_dispatch:
|
2024-03-26 20:31:02 +00:00
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- uses: denoland/setup-deno@v1
|
|
|
|
with:
|
|
|
|
deno-version: v1.x
|
|
|
|
|
|
|
|
- run: deno task build
|
|
|
|
|
|
|
|
- name: Upload Pages Artifact
|
|
|
|
uses: "actions/upload-pages-artifact@v3"
|
|
|
|
with:
|
|
|
|
path: "dist/"
|
2024-10-06 18:33:13 +00:00
|
|
|
|
2024-09-19 00:40:44 +00:00
|
|
|
- name: Upload CSS
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: css
|
|
|
|
path: "dist/"
|
2024-03-26 20:31:02 +00:00
|
|
|
|
|
|
|
release:
|
|
|
|
needs: "build"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Release"
|
|
|
|
id: "release"
|
2024-06-22 18:42:59 +00:00
|
|
|
uses: "googleapis/release-please-action@v4"
|
2024-10-06 18:33:13 +00:00
|
|
|
|
2024-09-19 00:40:44 +00:00
|
|
|
- name: Download CSS
|
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
name: css
|
|
|
|
path: "dist/"
|
2024-03-26 20:31:02 +00:00
|
|
|
|
|
|
|
- name: Create tarball
|
|
|
|
if: ${{ steps.release.outputs.release_created }}
|
|
|
|
run: tar czf catppuccin-gitea.tar.gz --directory=./dist .
|
|
|
|
|
|
|
|
- name: Upload Release Artifacts
|
|
|
|
if: ${{ steps.release.outputs.release_created }}
|
|
|
|
env:
|
2024-10-06 18:33:13 +00:00
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: gh release upload ${{ steps.release.outputs.tag_name }} ./catppuccin-gitea.tar.gz --repo $GITHUB_REPOSITORY
|
2024-03-26 20:31:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
needs: "build"
|
|
|
|
runs-on: "ubuntu-latest"
|
|
|
|
permissions:
|
|
|
|
pages: "write"
|
|
|
|
id-token: "write"
|
|
|
|
environment:
|
|
|
|
name: "github-pages"
|
|
|
|
url: "${{ steps.deployment.outputs.page_url }}"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Deploy to GitHub Pages"
|
|
|
|
id: "deployment"
|
|
|
|
uses: "actions/deploy-pages@v4"
|