Skip to content

CI

CI #8

Workflow file for this run

on:
workflow_dispatch:
# Release a new version with git tag, GitHub release + artifact uploading
name: CI
jobs:
Build-Release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Update project version via npm. Dicards "v" prefix
- name: Update project version
id: update-version
run: |
export newVersion=$(npm --no-git-tag-version version patch)
echo "NEW_VERSION=${newVersion:1}" >> "$GITHUB_ENV"
# Build project (keep it simple)
- name: Build project
run: npm install && npm run build
# Commit and push new release while retrieving commit hash
# that will be used to create tag in next step
- name: Commit & push new version with tag
id: push-new-version-with-tag
run: |
git config --global user.name 'gh-action'
git config --global user.email '[email protected]'
git commit -am "Release $NEW_VERSION"
git push
echo "NEW_COMMIT_SHA=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
git tag -a "$NEW_VERSION" -m "Release $NEW_VERSION"
git push origin --tags
- name: Create new release + upload build artifact
uses: softprops/action-gh-release@v2
with:
name: ${{ NEW_VERSION }}

Check failure on line 41 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 41, Col: 17): Unrecognized named-value: 'NEW_VERSION'. Located at position 1 within expression: NEW_VERSION .github/workflows/ci.yml (Line: 44, Col: 21): Unrecognized named-value: 'NEW_VERSION'. Located at position 1 within expression: NEW_VERSION
# Use empty description because we have nothing to say!
body: ""
tag_name: ${{ NEW_VERSION }}
target_commitish: ${{ NEW_COMMIT_SHA }}
files: dist/habitica-equipment-tracker/browser/**/*
fail_on_unmatched_files: true