diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 799a1c1..a8b9c48 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Build +name: Build and Release on: push: @@ -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