Replace deprecated add path command
Also consolidate cache steps type: development
This commit is contained in:
parent
05ba87039b
commit
a7e0995c7d
38
.github/workflows/build.yaml
vendored
38
.github/workflows/build.yaml
vendored
|
@ -10,11 +10,13 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Increment to invalidate github actions caches if they become corrupt.
|
# Cache issues can sometimes be fixed by incrementing this value.
|
||||||
# Errors of the form "can't find crate for `snafu_derive` which `snafu` depends on"
|
CACHE_KEY: 6
|
||||||
# can usually be fixed by incrementing this value.
|
|
||||||
CACHE_KEY_PREFIX: 3
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
all:
|
all:
|
||||||
|
@ -57,25 +59,16 @@ jobs:
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
brew install gnu-tar
|
brew install gnu-tar
|
||||||
echo "::add-path::/usr/local/opt/gnu-tar/libexec/gnubin"
|
echo /usr/local/opt/gnu-tar/libexec/gnubin > $GITHUB_PATH
|
||||||
|
|
||||||
- name: Cache cargo registry
|
- name: Cache
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.cargo/registry
|
path: |
|
||||||
key: ${{ env.CACHE_KEY_PREFIX }}-${{ runner.os }}-cargo-registry
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
- name: Cache cargo index
|
target
|
||||||
uses: actions/cache@v1
|
key: cargo-${{ env.CACHE_KEY }}-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
||||||
with:
|
|
||||||
path: ~/.cargo/git
|
|
||||||
key: ${{ env.CACHE_KEY_PREFIX }}-${{ runner.os }}-cargo-index
|
|
||||||
|
|
||||||
- name: Cache cargo build
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: ${{ env.CACHE_KEY_PREFIX }}-${{ runner.os }}-cargo-build-target
|
|
||||||
|
|
||||||
- name: Install Stable
|
- name: Install Stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
|
@ -126,11 +119,13 @@ jobs:
|
||||||
git diff --no-ext-diff --exit-code
|
git diff --no-ext-diff --exit-code
|
||||||
|
|
||||||
- name: Install `mdbook`
|
- name: Install `mdbook`
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
uses: peaceiris/actions-mdbook@v1
|
uses: peaceiris/actions-mdbook@v1
|
||||||
with:
|
with:
|
||||||
mdbook-version: latest
|
mdbook-version: latest
|
||||||
|
|
||||||
- name: Build Book
|
- name: Build Book
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
cargo run --package gen -- --bin target/debug/imdl book
|
cargo run --package gen -- --bin target/debug/imdl book
|
||||||
mdbook build book --dest-dir ../www/book
|
mdbook build book --dest-dir ../www/book
|
||||||
|
@ -150,7 +145,6 @@ jobs:
|
||||||
- name: Package
|
- name: Package
|
||||||
id: package
|
id: package
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
shell: bash
|
|
||||||
run: ./bin/package ${{github.ref}} ${{matrix.os}} ${{matrix.target}}
|
run: ./bin/package ${{github.ref}} ${{matrix.os}} ${{matrix.target}}
|
||||||
|
|
||||||
- name: Publish Release Archive
|
- name: Publish Release Archive
|
||||||
|
|
4
justfile
4
justfile
|
@ -116,6 +116,10 @@ demo-upload:
|
||||||
demo-render:
|
demo-render:
|
||||||
../asciicast2gif/asciicast2gif -S4 tmp/demo.json www/demo.gif
|
../asciicast2gif/asciicast2gif -S4 tmp/demo.json www/demo.gif
|
||||||
|
|
||||||
|
# print commit metadata types
|
||||||
|
commit-types:
|
||||||
|
cargo run --package gen -- --bin target/debug/imdl commit-types
|
||||||
|
|
||||||
# open site index
|
# open site index
|
||||||
www:
|
www:
|
||||||
open www/index.html
|
open www/index.html
|
||||||
|
|
Loading…
Reference in New Issue
Block a user