From a7e0995c7d2505fc0730944fa32f7564a6ebcaea Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 20 Nov 2020 15:33:24 -0800 Subject: [PATCH] Replace deprecated add path command Also consolidate cache steps type: development --- .github/workflows/build.yaml | 38 +++++++++++++++--------------------- justfile | 4 ++++ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 82b7fa9..ebd8822 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,11 +10,13 @@ on: branches: - master +defaults: + run: + shell: bash + env: - # Increment to invalidate github actions caches if they become corrupt. - # Errors of the form "can't find crate for `snafu_derive` which `snafu` depends on" - # can usually be fixed by incrementing this value. - CACHE_KEY_PREFIX: 3 + # Cache issues can sometimes be fixed by incrementing this value. + CACHE_KEY: 6 jobs: all: @@ -57,25 +59,16 @@ jobs: if: matrix.os == 'macos-latest' run: | 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 - uses: actions/cache@v1 + - name: Cache + uses: actions/cache@v2 with: - path: ~/.cargo/registry - key: ${{ env.CACHE_KEY_PREFIX }}-${{ runner.os }}-cargo-registry - - - name: Cache cargo index - uses: actions/cache@v1 - 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 + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-${{ env.CACHE_KEY }}-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} - name: Install Stable uses: actions-rs/toolchain@v1 @@ -126,11 +119,13 @@ jobs: git diff --no-ext-diff --exit-code - name: Install `mdbook` + if: matrix.os != 'windows-latest' uses: peaceiris/actions-mdbook@v1 with: mdbook-version: latest - name: Build Book + if: matrix.os != 'windows-latest' run: | cargo run --package gen -- --bin target/debug/imdl book mdbook build book --dest-dir ../www/book @@ -150,7 +145,6 @@ jobs: - name: Package id: package if: startsWith(github.ref, 'refs/tags/') - shell: bash run: ./bin/package ${{github.ref}} ${{matrix.os}} ${{matrix.target}} - name: Publish Release Archive diff --git a/justfile b/justfile index 1d4e7fe..439f714 100644 --- a/justfile +++ b/justfile @@ -116,6 +116,10 @@ demo-upload: demo-render: ../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 www: open www/index.html