Skip to content

fix stupid mistake

fix stupid mistake #9

Workflow file for this run

name: Build and Release Binary
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.x"
- name: Build Linux Binaries
run: |
mkdir -p build
GOOS=linux GOARCH=amd64 go build -o build/linux-amd64/server main.go
GOOS=linux GOARCH=arm64 go build -o build/linux-arm64/server main.go
- name: Compress Binaries
run: |
cd build
tar -czvf ssh-app-linux-amd64.tar.gz linux-amd64
tar -czvf ssh-app-linux-arm64.tar.gz linux-arm64
- name: Upload Binary Artifacts
uses: actions/upload-artifact@v4
with:
name: binaries
path: build/*.tar.gz
- name: Generate Release Tag
id: generate_tag
run: echo "RELEASE_TAG=$(date +'%d-%m-%Y')" >> $GITHUB_ENV
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.RELEASE_TAG }}
name: "Release ${{ env.RELEASE_TAG }}"
draft: true
artifacts: |
build/ssh-app-linux-amd64.tar.gz
build/ssh-app-linux-arm64.tar.gz