build(release-please): try to course correct (#35) #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release and Deploy | |
on: | |
workflow_dispatch: | |
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/" | |
release: | |
needs: "build" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: "Release" | |
id: "release" | |
uses: "googleapis/release-please-action@v4" | |
- 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: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload ${{ steps.release.outputs.tag_name }} ./catppuccin-gitea.tar.gz | |
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" |