Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shibbo authored Jan 20, 2025
1 parent 228281b commit 131bf8b
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build and Release

on:
push:
Expand Down Expand Up @@ -29,3 +29,29 @@ jobs:

- name: Run tests
run: dotnet test

release:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Create a Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Release Assets
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: SyatiModuleBuildTool.zip
asset_name: SyatiModuleBuildTool.zip
asset_content_type: application/zip

0 comments on commit 131bf8b

Please sign in to comment.