Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Commit f2ce445

Browse files
committed
release workflow を作成
1 parent 2d5accb commit f2ce445

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: git config
16+
run: |
17+
git config user.name github-actions
18+
git config user.email github-actions@github.com
19+
- name: extract release version
20+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
21+
- name: extract main version
22+
run: echo "MAJOR_VERSION=$(echo ${{ env.RELEASE_VERSION }} | cut -d . -f 1)" >> $GITHUB_ENV
23+
- name: update main version
24+
run: |
25+
git tag --force ${{ env.MAJOR_VERSION }}
26+
git push --force origin ${{ env.MAJOR_VERSION }}

0 commit comments

Comments
 (0)