Skip to content

Commit

Permalink
chore: implement auto deployment to JSR
Browse files Browse the repository at this point in the history
  • Loading branch information
rycont committed Nov 3, 2024
1 parent 5d51f18 commit fee4fb4
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 40 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/build.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish
on:
push:
branches:
- main
paths:
- 'deno.json'

jobs:
Publish:
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Run linter
run: deno lint

- name: Run tests
run: deno test --allow-read

- name: Get version from deno.json
id: get_version
run: echo "::set-output name=version::$(jq -r .version deno.json)"

- name: Create GitHub tag
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git tag -a v${{ steps.get_version.outputs.version }} -m "Release version ${{ steps.get_version.outputs.version }}"
git push origin v${{ steps.get_version.outputs.version }}
- name: Publish to JSR
run: deno publish
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:
contents: read

jobs:
test:
Test:
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
}
},
"name": "@yaksok-ts/core",
"version": "0.1.9",
"version": "0.1.10",
"exports": "./index.ts"
}

0 comments on commit fee4fb4

Please sign in to comment.