This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reformat the github workflows config, add crates.io deploy stage (#146)
- Loading branch information
Showing
5 changed files
with
89 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Deploy | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Installs the latest stable rust, and all components needed for the rest of the CI pipeline. | ||
- name: Set up CI environment | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
# Sanity check: make sure the release builds | ||
- name: Build | ||
run: cargo build --verbose | ||
|
||
# Sanity check: make sure all tests in the release pass | ||
- name: Test | ||
run: cargo test --verbose | ||
|
||
# Deploy to crates.io | ||
# Only works on github releases (tagged commits) | ||
- name: Deploy to crates.io | ||
env: | ||
CRATESIO_ENCRYPTED_TOKEN: ${{ secrets.CRATESIO_ENCRYPTED_TOKEN }} | ||
run: cargo publish --token $CRATESIO_ENCRYPTED_TOKEN --manifest-path Cargo.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Installs the latest stable rust, and all components needed for the rest of the CI pipeline. | ||
- name: Set up CI environment | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
# Sanity check: make sure the release builds | ||
- name: Build | ||
run: cargo build --verbose | ||
|
||
# Sanity check: make sure all tests in the release pass | ||
- name: Test | ||
run: cargo test --verbose | ||
|
||
# Generate docs and push to documentation branch | ||
- name: Generate docs | ||
env: | ||
GH_ENCRYPTED_TOKEN: ${{ secrets.GH_ENCRYPTED_TOKEN }} | ||
run: | | ||
cargo doc --all --no-deps | ||
echo '<meta http-equiv=refresh content=0;url=vst/index.html>' > target/doc/index.html | ||
sudo pip install ghp-import | ||
ghp-import -n target/doc | ||
git push -fq https://${GH_ENCRYPTED_TOKEN}@github.com/${GITHUB_REPOSITORY}.git gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters