Skip to content

Commit c52d39c

Browse files
committed
ci: switch release and publish workflow to Release Please
Drive-by: Use commit hashes for GitHub actions
1 parent 10e2513 commit c52d39c

6 files changed

Lines changed: 72 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818

1919
steps:
2020
- name: Setup repo
21-
uses: actions/checkout@v7
21+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2222

2323
- name: Setup Deno
24-
uses: denoland/setup-deno@v2
24+
uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5
2525
with:
2626
deno-version: v2.x
2727

.github/workflows/publish.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
id-token: write
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Run Release Please
19+
id: release
20+
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
21+
with:
22+
config-file: release-please-config.json
23+
manifest-file: .release-please-manifest.json
24+
25+
- name: Checkout repository
26+
if: ${{ steps.release.outputs.release_created == 'true' }}
27+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
28+
29+
- name: Setup Deno
30+
if: ${{ steps.release.outputs.release_created == 'true' }}
31+
uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5
32+
with:
33+
deno-version: v2.x
34+
35+
- name: Publish package to JSR
36+
if: ${{ steps.release.outputs.release_created == 'true' }}
37+
run: deno publish

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.8.1"
3+
}

CONTRIBUTING.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,17 @@ This project follows
3030
All submissions, including submissions by project members, require review. We
3131
use GitHub pull requests for this purpose. Consult
3232
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
33-
information on using pull requests.
33+
information on using pull requests.
34+
35+
### Commit messages
36+
37+
This repository uses [Conventional Commits](https://www.conventionalcommits.org/)
38+
and [Release Please](https://github.com/googleapis/release-please) for automated
39+
versioning and changelog generation.
40+
41+
PR titles and commit messages should follow the format:
42+
43+
* `feat: ...` for new features (triggers a `minor` version bump)
44+
* `fix: ...` for bug fixes (triggers a `patch` version bump)
45+
* `feat!: ...` or `fix!: ...` for breaking changes (triggers a `major` version bump)
46+
* `docs: ...`, `chore: ...`, `ci: ...`, `test: ...` for maintenance changes

release-please-config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "simple",
6+
"package-name": "@chrome-devtools/source-map-scopes-codec",
7+
"extra-files": [
8+
{
9+
"type": "json",
10+
"path": "deno.json",
11+
"jsonpath": "$.version"
12+
}
13+
]
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)