Skip to content

fix: use a hardcoded string for the version #28

fix: use a hardcoded string for the version

fix: use a hardcoded string for the version #28

Workflow file for this run

name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: "lts/*"
- name: Install dependencies
run: npm ci
- name: Release with next Semantic Version
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_COMMITTER_NAME: "Arc-E-Tect"
GIT_COMMITTER_EMAIL: "[email protected]"
GIT_AUTHOR_NAME: "Arc-E-Tect"
GIT_AUTHOR_EMAIL: "[email protected]"

Check failure on line 39 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 39
- name: Update version and date in file
run: |
# Get the version from the output of the Semantic Release step
# VERSION=${{ steps.semantic.outputs.new_release_published }}
VERSION=v1.3.1
# Get the current date
DATE=$(date +%Y-%m-%d)
# File where the version and date need to be updated
FILE="test.adoc"
# Regular expression to match the string to be replaced
REGEX="v[0-9]\+\.[0-9]\+\.[0-9]\+\, [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}"
# Replace the string in file
sed -i "s/$REGEX/v$VERSION, $DATE/g" $FILE
# - name: Commit and push changes
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action"
# git commit -am "Update version and date in file"
# git push