Skip to content

test release workflow #30

test release workflow

test release workflow #30

name: compile mikupad
on:
push:
tags:
- '*'
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: run compile.sh
run: chmod +x compile.sh; ./compile.sh

Check failure on line 25 in .github/workflows/compile_mikupad.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/compile_mikupad.yml

Invalid workflow file

You have an error in your yaml syntax on line 25
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add -f mikupad_compiled.html
git commit -m "Update mikupad_compiled.html" || echo "No changes to commit"
git push origin main || echo "Nothing to push"
- name: Get Commit Count
id: commit_count
run: echo "::set-output name=count::$(git rev-list --count HEAD)"
- name: Get Last Release Tag
id: last_release
run: echo "::set-output name=tag::$(git describe --tags --abbrev=0 HEAD^)"
- name: Generate Changelog
id: changelog
run: |
LAST_TAG=$(git describe --tags --abbrev=0 HEAD^)
echo "Generating changelog from $LAST_TAG"
echo "$(git log $LAST_TAG..HEAD --oneline)" > CHANGELOG.txt
echo "::set-output name=body::$(cat CHANGELOG.txt)"
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.commit_count.outputs.count }}
name: V${{ steps.commit_count.outputs.count }}
body: ${{ steps.changelog.outputs.body }}
files: mikupad_compiled.html
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v4