Skip to content

Release fmcsadmin 2.2.0 (#41) #11

Release fmcsadmin 2.2.0 (#41)

Release fmcsadmin 2.2.0 (#41) #11

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
build:
name: Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
# https://docs.github.com/ja/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
os: [ 'macos-latest' ]
go: [ '1.22' ]
steps:
- name: Setup go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
cache: false
go-version: ${{ matrix.go }}
- uses: actions/checkout@v4
- run: make dist
- name: Set version
id: version
run: |
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
echo ::set-output name=version::$VERSION
- name: Create release
id: create_release
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
release_name: fmcadmin ${{ steps.version.outputs.version }} Released
draft: true
prerelease: false
- name: Upload Release Asset for Linux (amd64)
id: upload-release-asset-for-linux
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/fmcsadmin-${{ steps.version.outputs.version }}-linux.tar.gz
asset_name: fmcsadmin-${{ steps.version.outputs.version }}-linux.tar.gz
asset_content_type: application/gzip
- name: Upload Release Asset for Linux (arm64)
id: upload-release-asset-for-linux-arm64
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/fmcsadmin-${{ steps.version.outputs.version }}-linux-arm64.tar.gz
asset_name: fmcsadmin-${{ steps.version.outputs.version }}-linux-arm64.tar.gz
asset_content_type: application/gzip
- name: Upload Release Asset for Windows (x64)
id: upload-release-asset-for-windows-x64
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/fmcsadmin-${{ steps.version.outputs.version }}-windows-x64.zip
asset_name: fmcsadmin-${{ steps.version.outputs.version }}-windows-x64.zip
asset_content_type: application/zip