Skip to content

Release dev to master (#377) #124

Release dev to master (#377)

Release dev to master (#377) #124

Workflow file for this run

name: recnet-api-ci
on:
push:
paths:
- "apps/recnet-api/package.json"
jobs:
version_bump:
runs-on: ubuntu-latest
permissions: write-all
if: github.event_name == 'push' &&
github.ref == 'refs/heads/master'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Extract version
id: extract_version
run: |
VERSION=$(grep -o '"version": *"[^"]*"' apps/recnet-api/package.json | cut -d '"' -f 4)
echo "::set-output name=version::$VERSION"
- name: Use extracted version
run: |
echo "Extracted version: ${{ steps.extract_version.outputs.version }}"
- name: Create tag
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/recnet-api-v${{ steps.extract_version.outputs.version }}',
sha: context.sha
})