Merge branch 'main' of https://github.com/A-J-Bauer/VGauge #66
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: minify-version-publish-to-dist | |
on: | |
push: | |
paths: | |
- 'vgauge.js' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.step2.outputs.version }} | |
steps: | |
- id: step1 | |
name: Checkout | |
uses: actions/checkout@v4 | |
- id: step2 | |
name: Parse file, read version, check if exists in dist, if not write file and minified version to dist | |
run: dotnet run --project .github/MinifyVersionPublishToFolder/MinifyVersionPublishToFolder.csproj vgauge.js dist | |
- id: step3 | |
name: Add commit and push | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
release: | |
runs-on: ubuntu-latest | |
needs: publish | |
steps: | |
- id: step1 | |
name: Checkout | |
uses: actions/checkout@v4 | |
- id: step2 | |
name: Create release | |
env: | |
VERSION: ${{needs.publish.outputs.version}} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create "$VERSION" \ | |
--repo="$GITHUB_REPOSITORY" \ | |
--title="${VERSION}" \ | |
--generate-notes | |
echo "::notice file=dotnet.yml::Created release $VERSION" |