Skip to content

chore: Release gptman version 1.0.1 #10

chore: Release gptman version 1.0.1

chore: Release gptman version 1.0.1 #10

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Install musl
uses: actions-rs/toolchain@v1
with:
target: x86_64-unknown-linux-musl
- name: Build release (Linux)
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features --target x86_64-unknown-linux-musl
- run: strip target/x86_64-unknown-linux-musl/release/gptman
- uses: actions/upload-artifact@v2
with:
name: binary-linux
path: target/x86_64-unknown-linux-musl/release/gptman
build-windows:
runs-on: windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Build release (Windows)
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features --target=x86_64-pc-windows-msvc
- uses: actions/upload-artifact@v2
with:
name: binary-windows
path: target/x86_64-pc-windows-msvc/release/gptman.exe
build-osx-x86:
runs-on: macos-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Build release (OSX)
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- uses: actions/upload-artifact@v2
with:
name: binary-osx
path: target/release/gptman
release:
needs: [build-linux, build-windows, build-osx-x86]
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- uses: actions/download-artifact@v2
with:
name: binary-linux
path: binary-linux
- uses: actions/download-artifact@v2
with:
name: binary-windows
path: binary-windows
- uses: actions/download-artifact@v2
with:
name: binary-osx
path: binary-osx
- name: Create 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 }}
body: gptman release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
- name: Upload Release Asset Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: binary-linux/gptman
asset_name: gptman-${{ steps.get_version.outputs.VERSION }}-linux-x86_64
asset_content_type: application/x-pie-executable
- name: Upload Release Asset Windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: binary-windows/gptman.exe
asset_name: gptman-${{ steps.get_version.outputs.VERSION }}-win-x86_64.exe
asset_content_type: application/x-dosexec
- name: Upload Release Asset OSX
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: binary-osx/gptman
asset_name: gptman-${{ steps.get_version.outputs.VERSION }}-osx-x86_64
asset_content_type: application/x-mach-binary