Skip to content

Merge branch 'main' of github.com:tonygilkerson/serial-gateway #45

Merge branch 'main' of github.com:tonygilkerson/serial-gateway

Merge branch 'main' of github.com:tonygilkerson/serial-gateway #45

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 }}