-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (34 loc) · 1.19 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 tests
run: deno task test
- 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 }}
continue-on-error: true
- name: Publish to JSR
run: deno publish