CD #56
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: CD | |
on: | |
push: | |
branches: | |
- trunk | |
workflow_run: | |
workflows: [CI] | |
types: [completed] | |
branches: [trunk] | |
jobs: | |
deploy: | |
runs-on: ${{ matrix.operating-system }} | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
environment: | |
name: production | |
url: https://jsr.io/@siguici/buno | |
permissions: | |
id-token: write | |
contents: read | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest] | |
deno-version: [1.45.5] | |
name: 🚀 Deploy Buno to JSR using Deno ${{ matrix.deno-version }} | |
steps: | |
- name: 🚚 Get latest code | |
uses: actions/checkout@v4 | |
- name: 🔨 Configure Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: ${{ matrix.deno-version }} | |
- name: 📂 Download Deno distribution files | |
uses: actions/download-artifact@v4 | |
with: | |
name: deno_dist | |
path: deno | |
run-id: ${{ github.event.workflow_run.id }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 📦️ Build NPM package | |
run: deno task build | |
- name: 🗃️ List distribution files | |
run: ls -la deno | |
- name: 🚨 Fix code style | |
run: deno task fix | |
- name: 🚀 Publish to JSR | |
run: deno publish |