diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 004ae4d..e676bf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,4 +14,4 @@ jobs: with: deno-version: ${{ env.DENO_VERSION }} - name: Check fmt & lint & type check & test - run: deno task check:dry + run: deno task check diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e187470..10c9d01 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,21 +7,19 @@ env: on: push: tags: - - '*' + - "*" permissions: contents: read - id-token: write # The OIDC ID token is used for authentication with JSR. - + id-token: write jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install Deno - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v1 with: deno-version: ${{ env.DENO_VERSION }} - name: Publish on tag - run: deno task publish \ No newline at end of file + run: deno run --allow-env --allow-run=deno --allow-read --allow-write=deno.jsonc jsr:@david/publish-on-tag@0.1.4 diff --git a/.github/workflows/udd.yml b/.github/workflows/udd.yml index 7ac9793..8c2891b 100644 --- a/.github/workflows/udd.yml +++ b/.github/workflows/udd.yml @@ -1,42 +1,19 @@ -# ported from https://github.com/jsr-core/unknownutil/blob/v3.18.1/.github/workflows/udd.yml and modified a bit -name: Update - -env: - DENO_VERSION: 1.x +name: update on: schedule: - cron: "0 0 * * *" workflow_dispatch: +permissions: + contents: write + pull-requests: write + jobs: - udd: + update: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: denoland/setup-deno@v1 - with: - deno-version: ${{ env.DENO_VERSION }} - - name: Update dependencies - run: | - deno task update > ../output.txt - env: - NO_COLOR: 1 - - name: Read ../output.txt - id: log - uses: juliangruber/read-file-action@v1 + - uses: hasundue/molt-action@v1 with: - path: ../output.txt - - uses: peter-evans/create-pull-request@v6 - with: - commit-message: ":package: Update Deno dependencies" - title: ":package: Update Deno dependencies" - body: | - The output of `deno task update` is - - ``` - ${{ steps.log.outputs.content }} - ``` - branch: update-deno-dependencies - author: GitHub - delete-branch: true \ No newline at end of file + commit-prefix: ":package:" diff --git a/deno.jsonc b/deno.jsonc index 8803db1..d488016 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -2,12 +2,12 @@ "name": "@cosense/std", "version": "0.0.0", "tasks": { - "check": "deno fmt && deno lint --fix && deno check --remote **/*.ts && deno test --allow-read", - "check:dry": "deno fmt --check && deno lint && deno check --remote **/*.ts && deno test --allow-read", - "update:check": "deno run --allow-env --allow-read --allow-write=.,'~/.local/share/deno-wasmbuild' --allow-run=git,deno --allow-net=deno.land,raw.githubusercontent.com,esm.sh,jsr.io,api.jsr.io,registry.npmjs.org jsr:@molt/cli@0.19", - "update": "deno task update:check --write", - "publish:check": "deno task check:dry && deno publish --dry-run --allow-dirty", - "publish": "deno run --allow-env --allow-run=deno --allow-read --allow-write=deno.jsonc jsr:@david/publish-on-tag@0.1.x" + "fix": "deno fmt && deno lint --fix && deno test --allow-read --doc --parallel --shuffle && deno publish --dry-run --allow-dirty", + "check": "deno fmt --check && deno lint && deno test --allow-read --doc --parallel --shuffle && deno publish --dry-run", + "coverage": "deno test --allow-read=./ --parallel --shuffle --coverage && deno coverage --html", + // from https://github.com/jsr-core/unknownutil/blob/v4.2.2/deno.jsonc#L84-L85 + "update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli", + "update:commit": "deno task -q update --commit --prefix deps: --pre-commit=fix" }, "imports": { "@core/unknownutil": "jsr:@core/unknownutil@^4.0.0",