ci: publish on successful release (#2676)
This commit is contained in:
parent
d6bfe0a3f1
commit
afd3d26da0
|
@ -5,48 +5,6 @@ on:
|
||||||
- "v*"
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Publish starship to Crates.io
|
|
||||||
cargo_publish:
|
|
||||||
name: Publish Cargo Package
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Setup | Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup | Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Build | Publish
|
|
||||||
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
|
|
||||||
|
|
||||||
update_brew_formula:
|
|
||||||
name: Update Brew Formula
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: mislav/bump-homebrew-formula-action@v1.12
|
|
||||||
with:
|
|
||||||
formula-name: starship
|
|
||||||
env:
|
|
||||||
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
|
||||||
|
|
||||||
publish_docs:
|
|
||||||
name: Publish docs to Netlify
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Setup | Checkout
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
uses: netlify/actions/build@master
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
||||||
|
|
||||||
# Build sources for every OS
|
# Build sources for every OS
|
||||||
github_build:
|
github_build:
|
||||||
name: Build release binaries
|
name: Build release binaries
|
||||||
|
@ -188,3 +146,47 @@ jobs:
|
||||||
body_path: RELEASE.md
|
body_path: RELEASE.md
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# Publish starship to Crates.io
|
||||||
|
cargo_publish:
|
||||||
|
name: Publish Cargo Package
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: github_release
|
||||||
|
steps:
|
||||||
|
- name: Setup | Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup | Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
profile: minimal
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Build | Publish
|
||||||
|
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
|
||||||
|
|
||||||
|
update_brew_formula:
|
||||||
|
name: Update Brew Formula
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: github_release
|
||||||
|
steps:
|
||||||
|
- uses: mislav/bump-homebrew-formula-action@v1.12
|
||||||
|
with:
|
||||||
|
formula-name: starship
|
||||||
|
env:
|
||||||
|
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
|
|
||||||
|
publish_docs:
|
||||||
|
name: Publish docs to Netlify
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: github_release
|
||||||
|
steps:
|
||||||
|
- name: Setup | Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
uses: netlify/actions/build@master
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
|
|
Loading…
Reference in New Issue