File tree Expand file tree Collapse file tree 3 files changed +50
-18
lines changed
Expand file tree Collapse file tree 3 files changed +50
-18
lines changed Original file line number Diff line number Diff line change 11#
2- # Main workflow to build and release
2+ # Main workflow to build
33
4- name : Main
4+ name : Build
55
66#
77# Operational Variables
2929 runs-on : ubuntu-latest
3030 steps :
3131
32- - name : Determine whether this is a release build
33- if : ${{ github.event_name == 'pull_request' && github.base_ref == 'refs/heads/main' }}
34- env :
35- IS_RELEASE : " true"
36- run : echo "We will be performing a release upon success"
37-
3832 - name : Pipeline Debugging
3933 run : |
4034 env
8276 with :
8377 name : coverage
8478 path : build/coverage.xml
85-
86- - name : Conditionally perform a release
87- if : ${{ env.IS_RELEASE == 'true' }}
88- uses : elgohr/Github-Release-Action@master
89- env :
90- GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
91- with :
92- args : Creating release
Original file line number Diff line number Diff line change 1+ #
2+ # Workflow to release, triggered by a push onto the protected main branch
3+
4+ name : Release
5+
6+ #
7+ # Operational Variables
8+
9+ env :
10+ MAJOR : 0
11+ MINOR : 0
12+ PYTHON_VERSION : 3.9.6
13+
14+ #
15+ # Establish when the workflow is run
16+
17+ on :
18+ push :
19+ branches :
20+ - main
21+
22+ #
23+ # Workflow
24+
25+ jobs :
26+
27+ build :
28+ runs-on : ubuntu-latest
29+ steps :
30+
31+ - name : Determine whether this is a release build
32+ run : echo "We will be performing a release upon success"
33+
34+ - name : Pipeline Debugging
35+ run : |
36+ env
37+
38+ - name : Checkout out our code
39+ uses : actions/checkout@v2
40+
41+ - name : Conditionally perform a release
42+ uses : elgohr/Github-Release-Action@master
43+ env :
44+ GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
45+ with :
46+ args : Creating release
Original file line number Diff line number Diff line change 2828# If we are running in the context of a GitHub action then we use the GITHUB_RUN_NUMBER
2929# otherwise we will default to 0 for the micro version.
3030
31- major = 0
32- minor = 0
31+ major = os . environ [ 'MAJOR' ] if 'MAJOR' in os . environ else 0
32+ minor = os . environ [ 'MINOR' ] if 'MINOR' in os . environ else 0
3333micro = os .environ ['GITHUB_RUN_NUMBER' ] if 'GITHUB_RUN_NUMBER' in os .environ else 0
3434dev = '.dev0' if 'IS_RELEASE' not in os .environ else ''
3535
You can’t perform that action at this time.
0 commit comments