Skip to content

v0.1.0

v0.1.0 #1

Workflow file for this run

name: Deploy
run-name: ${{ github.event_name == 'release' && github.ref_name || inputs.version }}
concurrency:
cancel-in-progress: false
group: '${{ github.workflow }}'
on:
release:
types:
- published
- edited
workflow_dispatch:
inputs:
version:
description: The version (the release name) to deploy
type: string
required: true
permissions:
contents: read
jobs:
setup:
name: Setup references
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.ref.outputs.ref }}
steps:
- name: Trigger on release
if: ${{ github.event_name == 'release' }}
run: echo "REF=${{ github.ref_name }}" >> "$GITHUB_ENV"
- name: Trigger on manual dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
run: echo "REF=${{ inputs.version }}" >> "$GITHUB_ENV"
- name: Set reference
id: ref
run: echo "ref=$REF" >> "$GITHUB_OUTPUT"
build:
name: Build
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install stable
rustup default stable
- name: Build cli
run: cargo build --release
- name: Attach to release
env:
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
run: gh release upload ${{needs.setup.outputs.ref}} ./target/release/powerd6_tools --clobber