Skip to content

Commit

Permalink
Merge pull request #178 from sunnamed434/update-workflows
Browse files Browse the repository at this point in the history
Auto release improvements
  • Loading branch information
sunnamed434 authored Jul 20, 2024
2 parents 40eeb9c + f08c77a commit ba5c8b4
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Artifacts for the BitMono CLI .NET Framework 4.6.2
name: BitMono.CLI.Release.net462

on:
create:
Expand All @@ -7,6 +7,7 @@ on:

jobs:
Build:
if: github.event_name == 'create' && github.event.ref_type == 'tag'
runs-on: windows-latest

steps:
Expand All @@ -16,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x
dotnet-version: 8.x

- name: Build
run: dotnet build ./src/BitMono.CLI/BitMono.CLI.csproj /p:TargetFramework=net462 /p:BitMonoVersion=${{ github.ref_name }} /p:CreateBitMonoArtifacts=true --configuration Release
Expand All @@ -42,12 +43,27 @@ jobs:
name: build
path: ./build/

- name: Create Release & Upload Assets
uses: ncipollo/release-action@v1
- name: Create version
id: get-version
run: echo "version=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
shell: bash

- name: Check Prerelease
id: check-prerelease
run: "if ${{ contains(steps.get-version.outputs.version, '-') }}; then
echo is_prerelease=true >> $GITHUB_OUTPUT;
else
echo is_prerelease=false >> $GITHUB_OUTPUT;
fi"
shell: bash

- name: Create Release
uses: ncipollo/[email protected]
with:
name: v${{ github.ref_name }}
tag: v${{ github.ref_name }}
name: BitMono Release v${{ steps.get-version.outputs.version }}
tag: v${{ steps.get-version.outputs.version }}
artifacts: "./build/BitMono-v${{ github.ref_name }}-CLI-net462.zip"
token: ${{secrets.PAT}}
prerelease: true
allowUpdates: true
token: ${{ secrets.PAT }}
prerelease: ${{ steps.check-prerelease.outputs.is_prerelease }}
allowUpdates: true
generateReleaseNotes: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Artifacts for the BitMono CLI .NET (Core) 6.0
name: BitMono.CLI.Release.net6.0

on:
create:
Expand All @@ -7,6 +7,7 @@ on:

jobs:
Build:
if: github.event_name == 'create' && github.event.ref_type == 'tag'
runs-on: windows-latest

steps:
Expand All @@ -16,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x
dotnet-version: 8.x

- name: Build
run: dotnet build ./src/BitMono.CLI/BitMono.CLI.csproj /p:TargetFramework=net6.0 /p:BitMonoVersion=${{ github.ref_name }} /p:CreateBitMonoArtifacts=true --configuration Release
Expand All @@ -42,12 +43,27 @@ jobs:
name: build
path: ./build/

- name: Create Release & Upload Assets
uses: ncipollo/release-action@v1
- name: Create version
id: get-version
run: echo "version=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
shell: bash

- name: Check Prerelease
id: check-prerelease
run: "if ${{ contains(steps.get-version.outputs.version, '-') }}; then
echo is_prerelease=true >> $GITHUB_OUTPUT;
else
echo is_prerelease=false >> $GITHUB_OUTPUT;
fi"
shell: bash

- name: Create Release
uses: ncipollo/[email protected]
with:
name: v${{ github.ref_name }}
tag: v${{ github.ref_name }}
name: BitMono Release v${{ steps.get-version.outputs.version }}
tag: v${{ steps.get-version.outputs.version }}
artifacts: "./build/BitMono-v${{ github.ref_name }}-CLI-net6.0.zip"
token: ${{secrets.PAT}}
prerelease: true
allowUpdates: true
token: ${{ secrets.PAT }}
prerelease: ${{ steps.check-prerelease.outputs.is_prerelease }}
allowUpdates: true
generateReleaseNotes: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Artifacts for the BitMono CLI .NET Standard 2.0
name: BitMono.CLI.Release.netstandard2.0

on:
create:
Expand All @@ -7,6 +7,7 @@ on:

jobs:
Build:
if: github.event_name == 'create' && github.event.ref_type == 'tag'
runs-on: windows-latest

steps:
Expand All @@ -16,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x
dotnet-version: 8.x

- name: Build
run: dotnet build ./src/BitMono.CLI/BitMono.CLI.csproj /p:TargetFramework=netstandard2.0 /p:BitMonoVersion=${{ github.ref_name }} /p:CreateBitMonoArtifacts=true --configuration Release
Expand All @@ -42,12 +43,27 @@ jobs:
name: build
path: ./build/

- name: Create Release & Upload Assets
uses: ncipollo/release-action@v1
- name: Create version
id: get-version
run: echo "version=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
shell: bash

- name: Check Prerelease
id: check-prerelease
run: "if ${{ contains(steps.get-version.outputs.version, '-') }}; then
echo is_prerelease=true >> $GITHUB_OUTPUT;
else
echo is_prerelease=false >> $GITHUB_OUTPUT;
fi"
shell: bash

- name: Create Release
uses: ncipollo/[email protected]
with:
name: v${{ github.ref_name }}
tag: v${{ github.ref_name }}
name: BitMono Release v${{ steps.get-version.outputs.version }}
tag: v${{ steps.get-version.outputs.version }}
artifacts: "./build/BitMono-v${{ github.ref_name }}-CLI-netstandard2.0.zip"
token: ${{secrets.PAT}}
prerelease: true
allowUpdates: true
token: ${{ secrets.PAT }}
prerelease: ${{ steps.check-prerelease.outputs.is_prerelease }}
allowUpdates: true
generateReleaseNotes: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Artifacts for the BitMono CLI .NET Standard 2.1
name: BitMono.CLI.Release.netstandard2.1

on:
create:
Expand All @@ -7,6 +7,7 @@ on:

jobs:
Build:
if: github.event_name == 'create' && github.event.ref_type == 'tag'
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -42,12 +43,27 @@ jobs:
name: build
path: ./build/

- name: Create Release & Upload Assets
uses: ncipollo/release-action@v1
- name: Create version
id: get-version
run: echo "version=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
shell: bash

- name: Check Prerelease
id: check-prerelease
run: "if ${{ contains(steps.get-version.outputs.version, '-') }}; then
echo is_prerelease=true >> $GITHUB_OUTPUT;
else
echo is_prerelease=false >> $GITHUB_OUTPUT;
fi"
shell: bash

- name: Create Release
uses: ncipollo/[email protected]
with:
name: v${{ github.ref_name }}
tag: v${{ github.ref_name }}
name: BitMono Release v${{ steps.get-version.outputs.version }}
tag: v${{ steps.get-version.outputs.version }}
artifacts: "./build/BitMono-v${{ github.ref_name }}-CLI-netstandard2.1.zip"
token: ${{secrets.PAT}}
prerelease: true
allowUpdates: true
token: ${{ secrets.PAT }}
prerelease: ${{ steps.check-prerelease.outputs.is_prerelease }}
allowUpdates: true
generateReleaseNotes: true

0 comments on commit ba5c8b4

Please sign in to comment.