-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.95 KB
/
semantic-release.yaml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Semantic Release
on:
push:
branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
semantic-release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [19.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node-version }}
- name: InstallDeps
run: |
sudo add-apt-repository ppa:rmescandon/yq
sudo apt update
sudo apt install yq -y
npm install @semantic-release/exec
npm install @semantic-release/git
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
dry_run: false
semantic_version: 19.0.5 # It is recommended to specify a version range
# for semantic-release when using
# semantic-release-action lower than @v3
env:
GITHUB_TOKEN: ${{ secrets.AEG_ADMIN }}
GH_TOKEN: ${{ secrets.AEG_ADMIN }}
- name: Semantic Release Version
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo Semantic Release Version ${{ steps.semantic.outputs.new_release_version }}
- name: Login to Container Registry
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.AEG_ADMIN }}
- name: Build and Push Container Image
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/build-push-action@v2
with:
push: true # Will only build if this is not here
tags: |
ghcr.io/${{ github.repository }}:v${{ steps.semantic.outputs.new_release_version }}