Skip to content

Run release job after build #47

Run release job after build

Run release job after build #47

Workflow file for this run

name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
inputs:
releaseAsPrerelease:
description: 'Release as Prerelease'
required: true
type: boolean
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install latest Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
override: true
components: rustfmt, clippy
- name: Build
id: build
run: |
cargo build --release
version=$(target/release/decky --version | cut -d " " -f 2)
echo "version=$version" >> $GITHUB_OUTPUT
- name: Upload binary
uses: actions/[email protected]
with:
name: decky
path: target/release/decky
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
if: github.event_name != 'pull_request'
steps:
- uses: actions/download-artifact@v3
with:
name: decky
- uses: ncipollo/release-action@v1
with:
artifacts: "decky"
skipIfReleaseExists: true
prerelease: ${{ github.event.inputs.releaseAsPrerelease || true }}
artifactErrorsFailBuild: true
artifactContentType: "application/octet-stream"
tag: ${{ steps.build.outputs.version }}