@@ -17,53 +17,21 @@ jobs:
17
17
with :
18
18
dotnet-version : 5.0.x
19
19
20
- - name : Data gatherer
21
- id : data_gatherer
22
- shell : pwsh
23
- run : |
24
- # Get default branch
25
- $repo = "${{ github.repository }}"
26
- $defaultBranch = Invoke-RestMethod -Method GET -Uri https://api.github.com/repos/$repo | Select-Object -ExpandProperty default_branch
27
- Write-Output "::set-output name=default_branch::$(echo $defaultBranch)"
28
-
29
- - name : Conditionals handler
30
- id : conditionals_handler
31
- shell : pwsh
32
- run : |
33
- $defaultBranch = "${{ steps.data_gatherer.outputs.default_branch }}"
34
- $githubRef = "${{ github.ref }}"
35
- $githubEventName = "${{ github.event_name }}"
36
- $isDefaultBranch = 'false'
37
- $isPush = 'false'
38
- $isPushToDefaultBranch = 'false'
39
- if ( $githubRef -like "*$defaultBranch*" ) {
40
- $isDefaultBranch = 'true'
41
- }
42
- if ( $githubEventName -eq 'push' ) {
43
- $isPush = 'true'
44
- }
45
- if ( $githubRef -like "*$defaultBranch*" -and $githubEventName -eq 'push' ) {
46
- $isPushToDefaultBranch = 'true'
47
- }
48
- Write-Output "::set-output name=is_default_branch::$(echo $isDefaultBranch)"
49
- Write-Output "::set-output name=is_push::$(echo $isPush)"
50
- Write-Output "::set-output name=is_push_to_default_branch::$(echo $isPushToDefaultBranch)"
51
-
52
20
- name : Checkout repository
53
21
id : checkout_repo
54
22
uses : actions/checkout@v2
55
23
with :
56
24
token : ${{ secrets.GITHUB_TOKEN }}
57
25
fetch-depth : 0
58
26
59
- - if : steps.conditionals_handler.outputs.is_push_to_default_branch == 'true '
27
+ - if : github.event_name == 'push' && github.ref == 'refs/heads/master '
60
28
name : Bump GH tag
61
29
id : tag_generator
62
30
uses :
mathieudutour/[email protected]
63
31
with :
64
32
github_token : ${{ secrets.GITHUB_TOKEN }}
65
33
default_bump : false
66
- release_branches : ${{ steps.data_gatherer.outputs.default_branch }}
34
+ release_branches : master
67
35
68
36
- name : Build projects
69
37
id : build_projects
0 commit comments