-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.4 KB
/
release-version.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
name: Detect and tag new version of o-platform
on:
push:
branches:
- "dev"
jobs:
tag-release:
name: Tag and release a new new version
runs-on: ubuntu-latest
outputs:
previous-version: ${{ steps.check-version.outputs.previous-version }}
current-version: ${{ steps.check-version.outputs.current-version }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Detect and tag new version
uses: salsify/action-detect-and-tag-new-version@v2
id: check-version
with:
version-command: |
node -p 'require("./shell/package.json").version'
- name: Release new tag
uses: ncipollo/release-action@v1
if: steps.check-version.outputs.previous-version != steps.check-version.outputs.current-version
with:
allowUpdates: true
generateReleaseNotes: true
tag: ${{ steps.check-version.outputs.tag }}
updateOnlyUnreleased: true
# TODO: Integrate Container Build
# call-build-container:
# name: Build tagged Container image
# needs: ["tag-release"]
# uses: ./.github/workflows/build-container.yml
# if: needs.tag-release.outputs.previous-version != needs.tag-release.outputs.current-version
# with:
# client_ref: "refs/tags/v${{ needs.tag-release.outputs.current-version }}"
# secrets: inherit