From 62449eedaf0c3a00ff06bf590964b06dd6fb28db Mon Sep 17 00:00:00 2001 From: "joe.miyamoto" Date: Sun, 12 Apr 2020 14:29:58 +0900 Subject: [PATCH] run create_release only once --- .github/workflows/release.yml | 40 ++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e344eb..97e3e09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,25 +14,6 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive - - name: Setup 3.1.200 .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.200 - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - - name: Cache cargo build - uses: actions/cache@v1 - with: - path: rust-lightning/target - key: ${{ matrix.os }}-cargo-build-target-${{ hashFiles('rust-lightning/Cargo.lock') }}-${{ hashFiles('rust-lightning/**/src/**') }} - - - name: pack - run: | - dotnet pack -p:Configuration=Release src/NRustLightning # workaround for upload-release-asset does not support variable expansion. # see: https://github.com/actions/upload-release-asset/issues/17 @@ -45,6 +26,7 @@ jobs: - name: Create release id: create_release uses: actions/create-release@v1 + if: startsWith( matrix.os, 'ubuntu') # we only want to run once. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -53,6 +35,26 @@ jobs: draft: false prerelease: true # TODO: change to false when ready + - name: Setup 3.1.200 .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.200 + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + + - name: Cache cargo build + uses: actions/cache@v1 + with: + path: rust-lightning/target + key: ${{ matrix.os }}-cargo-build-target-${{ hashFiles('rust-lightning/Cargo.lock') }}-${{ hashFiles('rust-lightning/**/src/**') }} + + - name: pack + run: | + dotnet pack -p:Configuration=Release src/NRustLightning + - name: upload release asset uses: actions/upload-release-asset@v1 env: