Skip to content

v3.13.0

v3.13.0 #17

Workflow file for this run

name: Release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
docker-build-and-publish:
name: "Docker: Build & Publish"
runs-on: ubuntu-latest
steps:
- name: "Config: Registry"
run: echo "REGISTRY=ghcr.io" >> $GITHUB_ENV
- name: "Config: Image Name"
run: echo "IMAGE_NAME=${{ github.repository_owner }}/$(basename ${{ github.repository }})" >> $GITHUB_ENV
- name: "Config: Image URL"
run: echo "IMAGE_URL=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" >> $GITHUB_ENV
# Derriving semver tags this way is hacky, but the action doesn't seem to think you would want to set
# both latest AND semver...
- name: "Config: Semver Tags"
run: |
echo "SEMVER_TAGS=$(echo ${{ github.ref }} \
| sed -e 's/refs\/tags\///g' \
| sed -E 's/v?([0-9]+)\.([0-9]+)\.([0-9]+)(-[a-zA-Z]+(\.[0-9]+)?)?/\1.\2.\3\4\,\1.\2\4\,\1\4/g')" >> $GITHUB_ENV
- name: "Repo: Checkout"
uses: actions/checkout@v4
- name: "Docker: Build & Publish"
id: build
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ env.IMAGE_NAME }}
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.PUBLISH_TOKEN }}
tags: latest,stable,${{ env.SEMVER_TAGS }}