Skip to content

Commit 92a0802

Browse files
authored
ci: add release-please workflow (#1892)
Closes #1881
1 parent f43f311 commit 92a0802

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
reviewers:
8+
- "gegoune"

.github/workflows/release-please.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: release-please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: google-github-actions/release-please-action@v3
11+
id: release
12+
with:
13+
release-type: node
14+
package-name: ${{env.ACTION_NAME}}
15+
command: github-release
16+
- uses: actions/checkout@v2
17+
- name: tag major and minor versions
18+
if: ${{ steps.release.outputs.release_created }}
19+
run: |
20+
git config user.name github-actions[bot]
21+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
22+
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
23+
git tag -d v${{ steps.release.outputs.major }} || true
24+
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
25+
git push origin :v${{ steps.release.outputs.major }} || true
26+
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
27+
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
28+
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
29+
git push origin v${{ steps.release.outputs.major }}
30+
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

0 commit comments

Comments
 (0)