Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast committed Sep 11, 2023
1 parent 4efaf8f commit 46b384c
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# https://sourcegraph.com/github.com/martinohmann/dts/-/blob/.github/workflows/release-please.yml
# https://sourcegraph.com/github.com/kabouzeid/turm/-/blob/.github/workflows/release.yml
# https://github.com/starship/starship/blob/master/.github/workflows/release.yml
name: release please
on:
workflow_dispatch:
inputs:
force-publish-crate:
required: true
type: boolean
description: Publish crate even if no new release was created.
force-publish-packages:
required: true
type: boolean
description: Publish packages even if no new release was created.
push:
branches:
- main

env:
CARGO_INCREMENTAL: 0

jobs:
release_please:
name: Release Please
runs-on: ubuntu-latest
if: github.repository == 'edeneast/tuxmux'
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: rust
bump-minor-pre-major: true
package-name: tuxmux
draft: true

publish-crate:
needs: release-please
if: ${{ needs.release-please.outputs.release_created || github.events.inputs.force-publish-crate == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v4

- name: Install rust

- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable

- name: Build | Publish to crates.io
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}

publish-packages:
needs: release-please
if: ${{ needs.release-please.outputs.release_created || github.event.inputs.force-publish-packages == 'true' }}
name: Package ${{ matrix.target }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
# Emit backtraces on panics.
RUST_BACKTRACE: 1

0 comments on commit 46b384c

Please sign in to comment.