Skip to content

Create Release

Create Release #18

Workflow file for this run

name: Create Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Publish Docker image to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: sitapati/zbctl
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: Dockerfile
tags: "${{ inputs.version }}, latest"
tag-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.17.0
cache: 'npm'
- name: Install
run: npm ci --ignore-scripts
- name: Set version
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
npm version ${{ inputs.version }} -m "Publish v%s"
- name: Publish to NPM
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access=public
- name: Push changes
run: git push --follow-tags