forked from SodaqMoja/Sodaq_DS3231
-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (45 loc) · 1.5 KB
/
prepare_release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
push:
branches:
- master
# Sequence of patterns matched against refs/tags
paths:
- 'VERSION' # Push events when the VERSION file changes
workflow_dispatch:
inputs:
include_dependencies:
description: 'True to include a zip file with dependencies in the release'
required: false
type: boolean
default: true
name: Create a New Release
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
jobs:
wait_for_checks:
if: ${{ github.event_name != 'workflow_dispatch' }}
strategy:
matrix:
req_workflow: [verify_library_structure.yaml, build_examples.yaml]
name: Wait for Checks to complete
runs-on: ubuntu-latest
steps:
- name: Wait on Workflow
uses: ArcticLampyrid/action-wait-for-workflow@v1.2.0
with:
workflow: ${{ matrix.req_workflow }}
sha: ${{ github.sha || github.event.pull_request.head.sha || github.event.pull_request.head.ref }} # optional
allowed-conclusions: |
success
cancelled
skipped
release:
name: Prepare a new release
needs: [wait_for_checks]
if: |
always() &&
(needs.wait_for_checks.result == 'success' || needs.wait_for_checks.result == 'skipped')
uses: EnviroDIY/workflows/.github/workflows/prepare_release.yaml@main
secrets: inherit
with:
include_dependencies: ${{ ( false ) || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true') }}