Skip to content

Commit

Permalink
create pipeline to build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
awcodify committed Nov 12, 2023
1 parent 4b4c5a7 commit 38ca094
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Release

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.x

- name: Build
run: go build -o GitInsights

release:
runs-on: ubuntu-latest
needs: build

steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}
release_name: Release v${{ github.run_number }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./GitInsights
asset_name: GitInsights
asset_content_type: application/octet-stream

0 comments on commit 38ca094

Please sign in to comment.