Skip to content

Commit

Permalink
run create_release only once
Browse files Browse the repository at this point in the history
  • Loading branch information
joemphilips committed Apr 12, 2020
1 parent f44fdc6 commit 62449ee
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 62449ee

Please sign in to comment.