Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .github/workflows/release-dev.yaml

This file was deleted.

25 changes: 13 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,23 @@ jobs:
github-releases:
runs-on: ubuntu-18.04
outputs:
tag: ${{ steps.check_rc.outputs.tag }}
rc: ${{ steps.check_rc.outputs.rc }}
image: ${{ steps.check_tag.outputs.image }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Check rc
id: check_rc
- name: Check Tag
id: check_tag
shell: bash
run: |
tag=${GITHUB_REF/refs\/tags\//}
echo "::set-output name=tag::$tag"
if [[ "$tag" =~ rc[0-9]+$ ]]; then
echo "::set-output name=rc::true"
else
tag=${GITHUB_REF##*/}
if [[ "$tag" =~ [0-9]+.[0-9]+.[0-9]+$ ]]; then
echo "::set-output name=image::deernetwork/deer-node:latest,deernetwork/deer-node:$tag"
echo "::set-output name=tag::$tag"
echo "::set-output name=rc::false"
else
echo "::set-output name=image::deernetwork/deer-node:dev"
echo "::set-output name=rc::true"
fi
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -41,16 +42,16 @@ jobs:
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ steps.check_rc.outputs.rc }}
prerelease: ${{ steps.check_tag.outputs.rc }}
files: |
target/release/deer-node
target/release/wbuild/deer-runtime/deer_runtime.compact.wasm

docker-hub:
runs-on: ubuntu-18.04
needs: ["github-releases"]
if: needs.github-releases.outputs.rc == 'false'
steps:
- run: echo "Build image ${{ needs.github-releases.outputs.image }}"
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
Expand All @@ -72,4 +73,4 @@ jobs:
with:
context: .
push: true
tags: deernetwork/deer-node:latest,deernetwork/deer-node:${{ needs.github-releases.outputs.tag }}
tags: ${{ needs.github-releases.outputs.image }}