Skip to content

Commit

Permalink
fixed release action files.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRivis committed Apr 7, 2023
1 parent e0c73e7 commit 5081963
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 73 deletions.
66 changes: 0 additions & 66 deletions .github/workflows/release-scriptbee-plugin.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/release-voyager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Voyager
on:
push:
tags:
- 'v*'
- 'v*-voyager'

jobs:
build-and-publish:
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
chmod +x honeydew/bin/osx/Honeydew
- name: Zip Voyager Release
run: zip -rl honeydew-voyager.zip honeydew
run: zip -rl honeydew.zip honeydew

- name: Prepare Release Notes
run: touch ${{ github.workspace }}/releaseNotes/v${{ steps.semver_parser.outputs.semver }}.md
Expand All @@ -100,9 +100,10 @@ jobs:
id: create_release
uses: softprops/action-gh-release@v1
with:
name: Honeydew ${{ steps.semver_parser.outputs.semver }}
name: Honeydew ${{ steps.semver_parser.outputs.semver }} (Voyager)
body_path: ${{ github.workspace }}/releaseNotes/v${{ steps.semver_parser.outputs.semver }}.md
body: ""
prerelease: false
draft: false
files: honeydew-voyager.zip
files: honeydew.zip

52 changes: 49 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
tags:
- 'v*'
- '!*-voyager'

jobs:
build-and-publish:
build-and-publish-os-specific:
name: Build and Publish
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -34,7 +35,7 @@ jobs:
- name: Release for OS
run: |
mkdir bin
dotnet publish -r ${{matrix.os}}-x64 --self-contained true -p:PublishSingleFile=true -o bin -c Release -p:Version=${{ steps.semver_parser.outputs.semver }} Honeydew/Honeydew.csproj
dotnet publish -r ${{matrix.os}}-x64 --self-contained false -p:PublishSingleFile=true -o bin -c Release -p:Version=${{ steps.semver_parser.outputs.semver }} Honeydew/Honeydew.csproj
- name: Prepare Assets
run: |
Expand All @@ -52,10 +53,54 @@ jobs:
name: honeydew-${{ matrix.os }}.zip
path: honeydew-${{ matrix.os }}.zip

build-scriptbee-plugin:
name: Build ScriptBee Plugin
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Extract Semver
id: semver_parser
run: |
semver=${TAG#"refs/tags/v"}
semver=${semver%"-voyager"}
echo ::set-output name=semver::$semver
env:
TAG: ${{ github.ref }}

- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: Release for OS
run: |
mkdir bin
dotnet publish -o bin -c Release -p:Version=${{ steps.semver_parser.outputs.semver }} Honeydew/Honeydew.csproj
- name: Prepare Assets
run: |
mkdir honeydew
cp manifest.yaml honeydew/manifest.yaml
cp README.md honeydew/README.md
rm bin/*.pdb
cp -R bin/*.dll honeydew
- name: Create Archive
run: zip -j honeydew-scriptbee.zip honeydew/*

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: honeydew-scriptbee.zip
path: honeydew-scriptbee.zip

release-and-upload:
name: Release and Upload
runs-on: ubuntu-latest
needs: build-and-publish
needs: [ build-and-publish-os-specific, build-scriptbee-plugin ]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -95,6 +140,7 @@ jobs:
./honeydew-win.zip/honeydew-win.zip
./honeydew-linux.zip/honeydew-linux.zip
./honeydew-osx.zip/honeydew-osx.zip
./honeydew-scriptbee.zip/honeydew-scriptbee.zip
npm-publish:
Expand Down

0 comments on commit 5081963

Please sign in to comment.