-
-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (31 loc) · 1 KB
/
release.yml
File metadata and controls
35 lines (31 loc) · 1 KB
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
name: Release
description: Release Please
on:
workflow_dispatch:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
issues: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Release Please
id: release
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Set correct latest release
if: ${{ steps.release.outputs.releases_created == 'true' }}
env:
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
run: |
LATEST_TAG=$(gh release list --repo ${{ github.repository }} --limit 10 --json tagName -q ".[].tagName" | grep -E '^v[0-9]' | head -n 1)
if [ -n "$LATEST_TAG" ]; then
gh release edit "$LATEST_TAG" --repo ${{ github.repository }} --latest
fi