Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Merge branch 'main' of https://github.com/Reishimanfr/vxinstagram #41

Merge branch 'main' of https://github.com/Reishimanfr/vxinstagram

Merge branch 'main' of https://github.com/Reishimanfr/vxinstagram #41

Workflow file for this run

name: Build and upload Go binaries
on:
push:
paths:
- '**.go'
pull_request:
paths:
- '**.go'
jobs:
build:
name: Build Go project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.4
- name: Install Dependencies
run: go mod tidy
- name: Build Binary linux/amd64
run: GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -tags=jsoniter -o vxinstagram-linux-amd64 .
- name: Build Binary darwin/amd64
run: GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -tags=jsoniter -o vxinstagram-darwin-amd64 .
- name: Upload Binary Artifact linux/amd64
uses: actions/upload-artifact@v4
with:
name: vxinstagram-linux-amd64
path: vxinstagram-linux-amd64
- name: Upload Binary Artifact darwin/amd64
uses: actions/upload-artifact@v4
with:
name: vxinstagram-darwin-amd64
path: vxinstagram-darwin-amd64
release:
name: Create GitHub Release
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get Latest Tag
id: get_tag
run: echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Download linux/amd64
uses: actions/download-artifact@v4
with:
name: vxinstagram-linux-amd64
path: .
- name: Download darwin/amd64
uses: actions/download-artifact@v4
with:
name: vxinstagram-darwin-amd64
path: .
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
gh release create $TAG_NAME \
vxinstagram-linux-amd64 \
vxinstagram-darwin-amd64 \
--title "$TAG_NAME" \
--notes "Automated release for $TAG_NAME"