Skip to content

bump version correctly so cli doesnt infinitely update #19

bump version correctly so cli doesnt infinitely update

bump version correctly so cli doesnt infinitely update #19

Workflow file for this run

name: Release Pipeline
on:
push:
tags:
- "v*.*.*"
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
jobs:
build:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
strategy:
fail-fast: false
matrix:
include:
- platform: "windows-latest"
target: "x86_64-pc-windows-msvc"
os: "windows"
arch: "x86_64"
postfix: ".exe"
cross: false
- platform: "ubuntu-latest"
target: "x86_64-unknown-linux-gnu"
os: "linux"
arch: "x86_64"
postfix: ""
cross: false
- platform: "ubuntu-latest"
target: "aarch64-unknown-linux-gnu"
os: "linux"
arch: "aarch64"
postfix: ""
cross: true
- platform: "macos-latest"
target: "x86_64-apple-darwin"
os: "macos"
arch: "x86_64"
postfix: ""
cross: false
- platform: "macos-latest"
target: "aarch64-apple-darwin"
os: "macos"
arch: "aarch64"
postfix: ""
cross: true
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Build Lodestone CLI
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: build
args: --release --target ${{ matrix.target }}
- name: Rename File
if: runner.os != 'Windows'
run: |
FILENAME="lodestone_cli_${{matrix.os}}_${{matrix.arch}}${{matrix.postfix}}"
echo "FILENAME=${FILENAME}" >> $GITHUB_ENV
mv ./target/${{ matrix.target }}/release/lodestone_cli${{ matrix.postfix }} ./${FILENAME}
- name: Rename File Windows
if: runner.os == 'Windows'
run: |
$FILENAME="lodestone_cli_${{matrix.os}}_${{matrix.arch}}${{matrix.postfix}}"
echo "FILENAME=$FILENAME" | Out-File -FilePath $env:GITHUB_ENV -Append
mv ./target/${{ matrix.target }}/release/lodestone_cli${{ matrix.postfix }} ./${FILENAME}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
path: ./${{env.FILENAME}}
name: ${{env.FILENAME}}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./${{env.FILENAME}}
tag_name: ${{ github.ref_name }}
body: "This is a release build from ${{ github.ref_name }}."
draft: true
prerelease: true