-
Notifications
You must be signed in to change notification settings - Fork 13
55 lines (46 loc) · 1.58 KB
/
update-and-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
51
52
53
54
55
# TODO abort if there are no changes to the Gemfile.
name: Update gems and release Docker image
on:
repository_dispatch:
types:
- gem-released-disabled
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- run: gem install bundler -v 2.0.2
- id: update
run: script/workflows/update.sh
env:
RELEASED_GEM_NAME: ${{ github.event.client_payload.name }}
RELEASED_GEM_VERSION: ${{ github.event.client_payload.version }}
- name: Commit and push gem file changes
uses: EndBug/add-and-commit@v4
with:
add: Gemfile.lock
author_name: Beth Skurrie via Github Action
author_email: beth@bethesque.com
message: 'feat(gems): ${{ steps.update.outputs.commit_message }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: prepare-release
name: Update version and generate changelog
run: script/workflows/prepare-release.sh
env:
INCREMENT: ${{ github.event.client_payload.increment }}
- name: Commit and push version and changelog
uses: EndBug/add-and-commit@v4
with:
add: lib/pact/cli/version.rb Gemfile.lock CHANGELOG.md
author_name: Beth Skurrie via Github Action
author_email: beth@bethesque.com
message: 'chore(release): version ${{ steps.prepare-release.outputs.tag }}'
tag: '${{ steps.prepare-release.outputs.tag }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}