Skip to content
Merged
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
56 changes: 34 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
push:
branches:
- '**'
pull_request:
delete:

jobs:
build_and_push:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -16,18 +17,32 @@ jobs:
node-version: 12.x

- uses: actions/checkout@v2

- name: Output info
id: info
run: |
if [ '${{ github.event_name }}' = 'pull_request' ]; then
echo '::set-output name=commit_message::'
exit 0
fi
echo '::set-output name=commit_message::[auto]'

- uses: satackey/push-prebuilt-action@v0.2.0-beta3
with:
commit-message: ${{ steps.info.outputs.commit_message }}
push-branch: '{branch}-release'

- uses: actions/upload-artifact@v2
with:
name: built
path: ./

#
# test built image caching

test_saving_built:
runs-on: ubuntu-latest
needs:
- build_and_push
needs: build

steps:
- uses: actions/checkout@v2
Expand All @@ -37,11 +52,11 @@ jobs:
id: extract
run: |
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"

- uses: actions/checkout@v2
name: Pull action
- name: Download action
uses: actions/download-artifact@v2
with:
ref: ${{ steps.extract.outputs.branch }}-release
name: built
path: action-dlc

- uses: ./action-dlc
Expand All @@ -54,8 +69,7 @@ jobs:

test_restoring_built:
runs-on: ubuntu-latest
needs:
- test_saving_built
needs: test_saving_built

steps:
- uses: actions/checkout@v2
Expand All @@ -66,10 +80,10 @@ jobs:
run: |
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"

- uses: actions/checkout@v2
name: Pull action
- name: Download action
uses: actions/download-artifact@v2
with:
ref: ${{ steps.extract.outputs.branch }}-release
name: built
path: action-dlc

- uses: ./action-dlc
Expand Down Expand Up @@ -106,19 +120,18 @@ jobs:

test_saving_pulled:
runs-on: ubuntu-latest
needs:
- build_and_push
needs: build

steps:
- name: Extract
id: extract
run: |
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"

- uses: actions/checkout@v2
name: Pull action
- name: Download action
uses: actions/download-artifact@v2
with:
ref: ${{ steps.extract.outputs.branch }}-release
name: built
path: action-dlc

- uses: ./action-dlc
Expand All @@ -131,19 +144,18 @@ jobs:

test_restoring_pulled:
runs-on: ubuntu-latest
needs:
- test_saving_pulled
needs: test_saving_pulled

steps:
- name: Extract
id: extract
run: |
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"

- uses: actions/checkout@v2
name: Pull action
- name: Download action
uses: actions/download-artifact@v2
with:
ref: ${{ steps.extract.outputs.branch }}-release
name: built
path: action-dlc

- uses: ./action-dlc
Expand Down