fix(ci): add v to tag #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |