Skip to content

Commit 712c50e

Browse files
authored
chore: setup release-plz (#280)
1 parent 8a128a2 commit 712c50e

File tree

5 files changed

+101
-41
lines changed

5 files changed

+101
-41
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
# Check for updates to GitHub Actions every week
7+
interval: "weekly"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Upload Schema
2+
on:
3+
release:
4+
types: [published]
5+
6+
permissions: {}
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: false
11+
12+
jobs:
13+
upload-schema:
14+
permissions:
15+
contents: write # to upload release assets
16+
if: github.repository_owner == 'agentclientprotocol' && startsWith(github.event.release.name, 'v')
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
21+
with:
22+
persist-credentials: false
23+
- name: Upload schema files to release
24+
env:
25+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
gh release upload "${{ github.event.release.name }}" schema.json meta.json schema.unstable.json meta.unstable.json

.github/workflows/publish.yml

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

.github/workflows/release-plz.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Release-plz
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release-plz-release:
10+
name: Release-plz release
11+
runs-on: ubuntu-latest
12+
if: ${{ github.repository_owner == 'agentclientprotocol' }}
13+
permissions:
14+
contents: write
15+
id-token: write
16+
steps:
17+
- &checkout
18+
name: Checkout repository
19+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
20+
with:
21+
fetch-depth: 0
22+
persist-credentials: false
23+
- &install-rust
24+
name: Install Rust toolchain
25+
uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e
26+
with:
27+
toolchain: stable
28+
- &generate-token
29+
# Generating a GitHub token, so that PRs and tags created by
30+
# the release-plz-action can trigger actions workflows.
31+
name: Generate GitHub token
32+
uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94
33+
id: generate-token
34+
with:
35+
# GitHub App ID secret name
36+
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
37+
# GitHub App private key secret name
38+
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
39+
- name: Run release-plz
40+
uses: release-plz/action@1efcf74dfcd6e500990dad806e286899ae384064
41+
with:
42+
command: release
43+
env:
44+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
45+
46+
release-plz-pr:
47+
name: Release-plz PR
48+
runs-on: ubuntu-latest
49+
if: ${{ github.repository_owner == 'agentclientprotocol' }}
50+
permissions:
51+
pull-requests: write
52+
contents: write
53+
concurrency:
54+
group: release-plz-${{ github.ref }}
55+
cancel-in-progress: false
56+
steps:
57+
- *checkout
58+
- *install-rust
59+
- *generate-token
60+
- name: Run release-plz
61+
uses: release-plz/action@1efcf74dfcd6e500990dad806e286899ae384064
62+
with:
63+
command: release-pr
64+
env:
65+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

.release-plz.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[workspace]
2+
git_release_type = "auto"

0 commit comments

Comments
 (0)