Merge branch 'develop' of github.com:flywp/server-cli into develop #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' # Matches tags like v1.0.0, v2.1.3, etc. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22 | |
- name: Run build script | |
run: bash ./build.sh | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifacts | |
path: build/*.tar.gz | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-artifacts | |
path: build | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Assets for amd64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: build/fly-linux-amd64.tar.gz | |
asset_name: fly-linux-amd64.tar.gz | |
asset_content_type: application/gzip | |
- name: Upload Release Assets for arm64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: build/fly-linux-arm64.tar.gz | |
asset_name: fly-linux-arm64.tar.gz | |
asset_content_type: application/gzip |