From eb674c76ef447401aa9d05f307e7429f6b37f0a9 Mon Sep 17 00:00:00 2001 From: Manish Meganathan Date: Tue, 20 Jul 2021 18:37:46 +0530 Subject: [PATCH] Create release workflow Resolves #5 - Created file release.yml as github workflow - Triggered on push of a new version tag - Cross-compiles binaries for multiple platforms and creates a github release with the build artifacts and release documentation --- .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f40ca97 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +# Workflow Name +name: GitHub Release + +# Workflow Triggers +on: + # Triggered on push of a new version tag + push: + tags: + - 'v*.*.*' + +# Workflow Jobs +jobs: + build-release: + runs-on: ubuntu-latest + steps: + # Checkout Git Repository + - name: Checkout Repository + uses: actions/checkout@v2 + + # Set Tag Environment Variable + - name: Set Tag Environment Value + run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + # Setup Go on runner + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + # Cross-Compile Binaries for all platforms + - name: Cross-Compile Binaries + run: make build-all + + # Create GitHub Release + - name: Create Release + uses: ncipollo/release-action@v1 + with: + name: "Tunalang ${{ env.TAG_VERSION }}" + bodyFile: "RELEASE.md" + artifacts: "bin/*" + token: ${{ secrets.GITHUB_TOKEN }}