-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.12 KB
/
Copy pathrelease-please.yml
File metadata and controls
39 lines (33 loc) · 1.12 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
36
37
38
39
name: Release Please
on:
push:
branches:
- main
permissions: {}
jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
steps:
- name: Run Release Please
id: release
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
- name: Checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
- name: Update floating major tag
if: ${{ steps.release.outputs.release_created }}
env:
MAJOR_VERSION: ${{ steps.release.outputs.major }}
TAG_NAME: ${{ steps.release.outputs.tag_name }}
run: |
echo "Updating floating tag v${MAJOR_VERSION} to point to ${TAG_NAME}"
git tag -d "v${MAJOR_VERSION}" 2>/dev/null || true
git push origin ":refs/tags/v${MAJOR_VERSION}" 2>/dev/null || true
git tag -a "v${MAJOR_VERSION}" -m "Floating tag for v${MAJOR_VERSION} major releases"
git push origin "v${MAJOR_VERSION}"