Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: auto release #15

Merged
merged 12 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/workflows/google-release-please.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/release-creation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
on:
workflow_run:
workflows:
- "macos-build-test.yml"
- "windows-build-test.yml"
- "linux-build-test.yml"
types:
- completed
push:
branches:
- main
name: combined-release-workflow

jobs:
combined-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Release Please
uses: google-github-actions/release-please-action@v3
with:
release-type: simple

- name: Check Release Creation
id: check-release-created
run: |
if gh release view "${{ steps.release.outputs.tag_name }}" > /dev/null; then
echo "Release was created."
else
echo "Release not created. Exiting."
exit 1
fi
shell: bash

- name: Publish Windows Build
run: dotnet publish ${{github.workspace}}/RTWLib_CLI/RTWLib_CLI.csproj -c Release -r win-x64 --self-contained true -o ./publish/win-x64

- name: Publish Windows Artifact
uses: actions/upload-artifact@v2
with:
name: RTWRand-windows
path: ${{github.workspace}}/publish/win-x64

- name: Publish macOS Build
run: dotnet publish ${{github.workspace}}/RTWLib_CLI/RTWLib_CLI.csproj -c Release -r osx-x64 --self-contained true -o ./publish/osx-x64

- name: Publish macOS Artifact
uses: actions/upload-artifact@v2
with:
name: RTWRand-macos
path: ${{github.workspace}}/publish/osx-64

- name: Publish Linux Build
run: dotnet publish ${{github.workspace}}/RTWLib_CLI/RTWLib_CLI.csproj -c Release -r linux-x64 --self-contained true -o ./publish/linux-x64

- name: Publish linux Artifact
uses: actions/upload-artifact@v2
with:
name: RTWRand-linux
path: ${{github.workspace}}/publish/linux-x64


- name: Upload Release Artifacts
run: |
release_tag="${{ steps.release.outputs.tag_name }}"
gh release upload "$release_tag" ${{github.workspace}}/publish/win-x64/* --clobber
gh release upload "$release_tag" ${{github.workspace}}/publish/osx-x64/* --clobber
gh release upload "$release_tag" ${{github.workspace}}/publish/linux-x64/* --clobber
shell: bash

Loading