forked from ParabolInc/parabol
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.91 KB
/
release-please.yml
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
on: [push]
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
default-branch: release
- run: |
echo ${{ steps.release.outputs.release_created }}
echo ${{ steps.release.outputs.upload_url }}
echo ${{ steps.release.outputs.html_url }}
echo ${{ steps.release.outputs.tag_name }}
echo ${{ steps.release.outputs.major }}
echo ${{ steps.release.outputs.minor }}
echo ${{ steps.release.outputs.patch }}
echo ${{ steps.release.outputs.sha }}
echo ${{ steps.release.outputs.pr }}
echo ${{ steps.release.outputs.prs }}
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- name: Tagging the release
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} || true
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}"
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}