-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #48 - исключение release ветки из Develop Workflow * #48 - вернул release.yml * #48 - новый Release Workflow * fix * fix * fix
- Loading branch information
Showing
4 changed files
with
111 additions
and
66 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: Release Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'release_test' | ||
|
||
jobs: | ||
create-release: | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
determined_version: ${{ steps.version_step.outputs.majorMinorPatch }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup GitVersion | ||
uses: gittools/actions/gitversion/setup@v3.0.0 | ||
with: | ||
versionSpec: '5.12.0' | ||
- name: Determine Version | ||
id: version_step | ||
uses: gittools/actions/gitversion/execute@v3.0.0 | ||
with: | ||
useConfigFile: true | ||
- name: Setup GitReleaseManager | ||
uses: gittools/actions/gitreleasemanager/setup@v3.0.0 | ||
with: | ||
versionSpec: '0.18.x' | ||
- name: Create release with GitReleaseManager | ||
uses: gittools/actions/gitreleasemanager/create@v3.0.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
owner: 'Stepami' | ||
repository: 'hydrascript' | ||
milestone: 'v${{ steps.version_step.outputs.majorMinorPatch }}' | ||
name: 'v${{ steps.version_step.outputs.majorMinorPatch }}' | ||
|
||
upload-release-assets: | ||
name: Upload release assets | ||
needs: create-release | ||
outputs: | ||
determined_version: ${{ needs.create-release.outputs.determined_version }} | ||
strategy: | ||
matrix: | ||
config: | ||
- os: ubuntu-latest | ||
rid: linux-x64 | ||
- os: macos-12 | ||
rid: osx-x64 | ||
- os: macos-14 | ||
rid: osx-arm64 | ||
- os: windows-latest | ||
rid: win-x64 | ||
runs-on: ${{ matrix.config.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Setup GitReleaseManager | ||
uses: gittools/actions/gitreleasemanager/setup@v3.0.0 | ||
with: | ||
versionSpec: '0.18.x' | ||
- name: Publish | ||
run: | | ||
mkdir output | ||
dotnet publish ./src/HydraScript/HydraScript.csproj -c Release -r ${{ matrix.config.rid }} -p:PublishSingleFile=true -p:DebugType=embedded -p:Version=${{ needs.create-release.outputs.determined_version }} --self-contained false -o ./output | ||
- name: Rename Executable | ||
run: mv ./output/HydraScript${{ matrix.config.rid == 'win-x64' && '.exe' || '' }} ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }} | ||
- name: Add asset to a release with GitReleaseManager | ||
uses: gittools/actions/gitreleasemanager/addasset@v3.0.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
owner: 'Stepami' | ||
repository: 'hydrascript' | ||
milestone: 'v${{ needs.create-release.outputs.determined_version }}' | ||
assets: ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }} | ||
|
||
publish-release: | ||
name: Publish release | ||
runs-on: ubuntu-latest | ||
needs: upload-release-assets | ||
steps: | ||
- name: Setup GitReleaseManager | ||
uses: gittools/actions/gitreleasemanager/setup@v3.0.0 | ||
with: | ||
versionSpec: '0.18.x' | ||
- name: Publish release with GitReleaseManager | ||
uses: gittools/actions/gitreleasemanager/publish@v3.0.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
owner: 'Stepami' | ||
repository: 'hydrascript' | ||
milestone: 'v${{ needs.upload-release-assets.outputs.determined_version }}' | ||
- name: Close release with GitReleaseManager | ||
uses: gittools/actions/gitreleasemanager/close@v3.0.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
owner: 'Stepami' | ||
repository: 'hydrascript' | ||
milestone: 'v${{ needs.upload-release-assets.outputs.determined_version }}' |
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