Skip to content

Commit

Permalink
add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKhanj committed Aug 18, 2024
1 parent a990e71 commit 7b5ecf0
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and Release Salsa

on:
push:
tags:
- 'v*.*.*'

jobs:
build:
name: Build Salsa
runs-on: ubuntu-latest

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

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20' # or the Go version you need

- name: Install dependencies
run: go mod tidy

- name: Build project with Make
run: make

- name: Create release tarball
run: tar -czvf salsa.tar.gz -C build salsa salsa.1.gz

- name: Upload tarball as artifact
uses: actions/upload-artifact@v3
with:
name: salsa-release
path: salsa.tar.gz

release:
name: Release Salsa
needs: build
runs-on: ubuntu-latest

steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: salsa-release

- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: salsa.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7b5ecf0

Please sign in to comment.