Release dev to master (#377) #124
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: 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 | |
}) |