Skip to content

fix syntax

fix syntax #8

name: build gh release from tag
on:
push:
tags:
- "*/v*"
env:
REGISTRY: ghcr.io
jobs:
publish-ghcr-image:
runs-on: ubuntu-latest
steps:
- uses: olegtarasov/[email protected]
id: tagName
with:
tagRegex: (?<service>.*)\/v(?<version>.*) #example: backend/v1.2.3
tagRegexGroup: 0
- name: show-service
env:
ghRef: ${{ github.ref }}
service: ${{ steps.tagName.outputs.service }}
version: ${{ steps.tagName.outputs.version }}
tagFromAction: ${{ steps.tagName.outputs.tag }}
run: |
echo "Ref: $ghRef"
echo "Service: $service"
echo "Version: $version"
echo "tagFromAction: $tagFromAction"
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
env:
service: ${{ steps.tagName.outputs.service }}
with:
cache: 'maven'
cache-dependency-path: '${{ service }}/pom.xml'

Check failure on line 42 in .github/workflows/create-release-from-tag.yml

View workflow run for this annotation

GitHub Actions / build gh release from tag

Invalid workflow file

The workflow is not valid. .github/workflows/create-release-from-tag.yml (Line: 42, Col: 34): Unrecognized named-value: 'service'. Located at position 1 within expression: service .github/workflows/create-release-from-tag.yml (Line: 55, Col: 18): Unrecognized named-value: 'service'. Located at position 1 within expression: service
java-version: '17'
distribution: 'temurin'
- name: build jar without tests
run: mvn -B -ntp -DskipTests package
- name: Create GitHub Release
id: create_release
env:
service: ${{ steps.tagName.outputs.service }}
uses: softprops/action-gh-release@v1
with:
files: |
${{ service }}/target/*.jar
draft: false
prerelease: false
generate_release_notes: false