From b6d1b91ca672d0d8bbe4b2449cae5bf56435729a Mon Sep 17 00:00:00 2001 From: "@masonmark" Date: Sun, 22 Dec 2024 21:18:37 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20Automate=20JSR=20publis?= =?UTF-8?q?h=20step=20via=20GitHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ .github/workflows/publish.yml | 19 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 .github/workflows/ci.yml create mode 100755 .github/workflows/publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100755 index 0000000..7736c8c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI +on: + push: + branches: ["*"] + +jobs: + run_tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + + - name: Test + run: deno test --allow-read --allow-write + + ## The --allow-dirty is needed here because in CI the deno.lock file may be modified + - name: JSR check + run: deno publish --dry-run --allow-dirty diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100755 index 0000000..ad5781d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,19 @@ +name: Publish +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + + - name: Publish package + run: npx jsr publish