diff options
author | kevin <robertsonk@gmail.com> | 2022-09-18 19:01:56 -0400 |
---|---|---|
committer | kevin <robertsonk@gmail.com> | 2022-09-18 19:01:56 -0400 |
commit | 2ff2760ecab39efc343b95d06df5b2fd224ee1e5 (patch) | |
tree | f454f5fd32bc1e139d7c734241849d284333e7a8 /.github | |
parent | 5667dcfef06cd5fea40f7523717877a7d23a464d (diff) | |
download | Inveigh-2ff2760ecab39efc343b95d06df5b2fd224ee1e5.tar.gz Inveigh-2ff2760ecab39efc343b95d06df5b2fd224ee1e5.zip |
dev buildsdev
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/dev.yml | 67 | ||||
-rw-r--r-- | .github/workflows/release.yml | 59 |
2 files changed, 126 insertions, 0 deletions
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..ad0b8f2 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,67 @@ +on: + push: + branches: [ dev ] + pull_request: + branches: [ dev ] + +name: Dev + +jobs: + build: + runs-on: windows-latest + defaults: + run: + shell: bash + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.x + + - name: Restore Dependencies + run: dotnet restore + + - name: Build + run: | + VERSION=${{ github.ref_name }} + dotnet build -c debug + + - name: Zip - Build + run: | + 7z a -tzip -mx9 Inveigh-net3.5-dev.zip $PWD/Inveigh/bin/debug/net35/* + 7z a -tzip -mx9 Inveigh-net4.6.2-dev.zip $PWD/Inveigh/bin/debug/net462/* + 7z a -tzip -mx9 Inveigh-net6.0-dev.zip $PWD/Inveigh/bin/debug/net6.0/* -x!*/ + + - name: Publish - Trimmed/Single File + run: | + VERSION=${{ github.ref_name }} + dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-x64 -f net6.0 -p:AssemblyName=inveigh -c debug + dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r osx-x64 -f net6.0 -p:AssemblyName=inveigh -c debug + dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r win-x64 -f net6.0 -c debug + + - name: Zip - Publish + run: | + tar -czvf Inveigh-net6.0-linux-x64-trimmed-single-dev.tar.gz --directory=$PWD/Inveigh/bin/debug/net6.0/linux-x64/publish/ . + tar -czvf Inveigh-net6.0-osx-x64-trimmed-single-dev.tar.gz --directory=$PWD/Inveigh/bin/debug/net6.0/osx-x64/publish/ . + 7z a -tzip -mx9 Inveigh-net6.0-win-x64-trimmed-single-dev.zip $PWD/Inveigh/bin/debug/net6.0/win-x64/publish/* + + - name: Release .zip + if: "! startsWith(github.event_name, 'pull_request')" + uses: softprops/action-gh-release@v1 + with: + name: Dev Branch Debug Builds + tag_name: development + prerelease: true + files: "Inveigh*.zip" + body: | + Latest ${{ github.ref_name }} branch debug builds (${{ github.sha }}) + + - name: Release tar.gz + uses: softprops/action-gh-release@v1 + with: + tag_name: development + files: "Inveigh*.tar.gz" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f73107e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,59 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + build: + runs-on: windows-latest + defaults: + run: + shell: bash + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.x + + - name: Restore Dependencies + run: dotnet restore + + - name: Build + run: | + VERSION=${{ github.ref_name }} + dotnet build -c release -p:Version=${VERSION:1} + + - name: Zip - Build + run: | + 7z a -tzip -mx9 Inveigh-net3.5-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net35/* + 7z a -tzip -mx9 Inveigh-net4.6.2-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net462/* + 7z a -tzip -mx9 Inveigh-net6.0-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net6.0/* -x!*/ + + - name: Publish - Trimmed/Single File + run: | + VERSION=${{ github.ref_name }} + dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=${VERSION:1} -r linux-x64 -f net6.0 -p:AssemblyName=inveigh -c release + dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=${VERSION:1} -r osx-x64 -f net6.0 -p:AssemblyName=inveigh -c release + dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=${VERSION:1} -r win-x64 -f net6.0 -c release + + - name: Zip - Publish + run: | + tar -czvf Inveigh-net6.0-linux-x64-trimmed-single-${{ github.ref_name }}.tar.gz --directory=$PWD/Inveigh/bin/release/net6.0/linux-x64/publish/ . + tar -czvf Inveigh-net6.0-osx-x64-trimmed-single-${{ github.ref_name }}.tar.gz --directory=$PWD/Inveigh/bin/release/net6.0/osx-x64/publish/ . + 7z a -tzip -mx9 Inveigh-net6.0-win-x64-trimmed-single-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net6.0/win-x64/publish/* + + - name: Release .zip + uses: softprops/action-gh-release@v1 + with: + files: "Inveigh*.zip" + + - name: Release tar.gz + uses: softprops/action-gh-release@v1 + with: + files: "Inveigh*.tar.gz" |