-
Notifications
You must be signed in to change notification settings - Fork 43
50 lines (49 loc) · 1.47 KB
/
release.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
41
42
43
44
45
46
47
48
49
50
name: Release
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
token: ${{ secrets.GIT_BOT_TOKEN }}
- uses: fusion-engineering/setup-git-credentials@v2
with:
credentials: ${{ format('https://x-access-token:{0}@github.com/', secrets.GIT_BOT_TOKEN) }}
- id: prep
name: next release version
uses: jenkins-x-plugins/jx-release-version@v2.7.3
- env:
VERSION: ${{ steps.prep.outputs.version }}
run: |
echo "tagging version $VERSION"
git config --global user.email "james.strachan@gmail.com"
git config --global user.name "jstrachan"
git tag -fa v$VERSION -m "Release version $VERSION"
git push --force origin v$VERSION
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }}
with:
tag_name: v${{ steps.prep.outputs.version }}
release_name: ${{ steps.prep.outputs.version }}
body: |
New release
draft: false
prerelease: false
- env:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }}
VERSION: ${{ steps.prep.outputs.version}}
XDG_CONFIG_HOME: /github/home/.config
name: updatebot
uses: docker://ghcr.io/jenkins-x/jx-updatebot:0.4.22
with:
args: pr --git-credentials
"on":
push:
branches:
- main
- master