-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (74 loc) · 2.16 KB
/
release-please.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
on:
workflow_dispatch:
inputs:
force:
description: Whether forcing to publish a release
required: true
type: boolean
release_version:
description: Version to publish (vX.Y.Z)
required: true
type: string
push:
branches:
- main
permissions:
contents: write
id-token: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release_please
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
outputs:
release_created: ${{ steps.release_please.outputs.release_created }}
tag_name: ${{ steps.release_please.outputs.tag_name }}
publish:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created || github.event.inputs.force }}
env:
VERSION: ${{ needs.release-please.outputs.tag_name || inputs.release_version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Generate docs
run: deno task doc
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
- name: Setup Node.js package
run: |
deno run -A ./scripts/build_npm.ts ${VERSION#v}
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: npm/
provenance: true
- name: Publish package
run: npx jsr publish
- name: Upload files
env:
GH_TOKEN: ${{ github.token }}
run: |
set -e
echo "Creating tarball"
tar cvzf raw.tar.gz --directory=npm/ .
echo "Creating zip"
pushd npm
zip -r "$GITHUB_WORKSPACE/raw.zip" ./*
popd
echo "Uploading release assets"
gh release upload ${{ env.VERSION }} raw.zip raw.tar.gz --clobber