Wrap Result in AstGenWrapper (#13) #8
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: release | |
on: | |
push: | |
branches: [master, main] | |
tags: ["*"] | |
paths-ignore: ['**.md'] | |
concurrency: production | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.x' | |
- name: Get next release version (dry run) | |
id: taggerDryRun | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
DRY_RUN: true | |
- name: echo new tag | |
run: | | |
export NEXT_VERSION=${{ steps.taggerDryRun.outputs.new_tag }} | |
echo "The next tag version will be: $NEXT_VERSION" | |
- name: echo tag | |
run: | | |
echo "The current tag is: ${{ steps.taggerDryRun.outputs.tag }}" | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Compile | |
run: ./build-with-version.sh $NEXT_VERSION | |
- name: Build | |
run: | | |
./publish-release.sh linux x64 | |
./publish-release.sh linux arm | |
./publish-release.sh osx x64 | |
./publish-release.sh osx arm64 | |
./publish-release.sh win x64 | |
./publish-release.sh win arm | |
- name: Rename | |
run: | | |
mv ./release/linux/DotNetAstGen dotnetastgen-linux | |
mv ./release/linux-arm/DotNetAstGen dotnetastgen-linux-arm | |
mv ./release/macos/DotNetAstGen dotnetastgen-macos | |
mv ./release/macos-arm/DotNetAstGen dotnetastgen-macos-arm | |
mv ./release/win/DotNetAstGen.exe dotnetastgen-win.exe | |
mv ./release/win-arm/DotNetAstGen.exe dotnetastgen-win-arm.exe | |
- name: Make executable | |
run: | | |
chmod +x dotnetastgen-linux | |
chmod +x dotnetastgen-linux-arm | |
chmod +x dotnetastgen-macos | |
chmod +x dotnetastgen-macos-arm | |
- name: Compress all executables | |
run: | | |
zip dotnetastgen-linux.zip dotnetastgen-linux | |
zip dotnetastgen-linux-arm.zip dotnetastgen-linux-arm | |
zip dotnetastgen-macos.zip dotnetastgen-macos | |
zip dotnetastgen-macos-arm.zip dotnetastgen-macos-arm | |
zip dotnetastgen-win.zip dotnetastgen-win.exe | |
zip dotnetastgen-win-arm.zip dotnetastgen-win-arm.exe | |
- name: Set next release version | |
id: taggerFinal | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.taggerDryRun.outputs.new_tag }} | |
files: | | |
dotnetastgen-linux.zip | |
dotnetastgen-linux-arm.zip | |
dotnetastgen-macos.zip | |
dotnetastgen-macos-arm.zip | |
dotnetastgen-win.zip | |
dotnetastgen-win-arm.zip |