1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 07:46:28 +00:00

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

View File

@ -5,48 +5,6 @@ on:
- "v*"
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
github_build:
name: Build release binaries
@ -188,3 +146,47 @@ jobs:
body_path: RELEASE.md
env:
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 }}