ci: publish on successful release (#2676)

This commit is contained in:
Matan Kushner 2021-05-01 15:42:08 -04:00 committed by GitHub
parent d6bfe0a3f1
commit afd3d26da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 42 deletions

View File

@ -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 }}