34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: CreateVersion
|
|
run-name: ${{ gitea.actor }} build image and push to container registry
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'staging'
|
|
- 'dev'
|
|
|
|
jobs:
|
|
BumpVersion:
|
|
runs-on: ["skeris"]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: http://gitea.pena:3000/PenaDevops/actions.git/checkout@v1
|
|
- name: Publish
|
|
run: |
|
|
git config --global user.email "kotilion.95@gmail.com"
|
|
git config --global user.name "skeris"
|
|
npm config set @frontend:registry=http://gitea.pena/api/packages/skeris/npm/
|
|
npm config set registry=https://registry.npmjs.org/
|
|
npm config set -- '//gitea.pena/api/packages/skeris/npm/:_authToken' "1856e802057f59193ca6fdb4068cbea44982bcc2"
|
|
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
|
|
npm version major
|
|
elif [ "${{ github.ref }}" == "refs/heads/staging" ]; then
|
|
npm version minor
|
|
else
|
|
npm version patch
|
|
fi
|
|
npm install --force
|
|
git push --follow-tags
|
|
npm publish
|