Skip to content

Commit 7f9e6b8

Browse files
authored
switch release branch to master (#19)
1 parent 97b2a50 commit 7f9e6b8

File tree

1 file changed

+2
-34
lines changed

1 file changed

+2
-34
lines changed

.github/workflows/ci-cd.yml

+2-34
Original file line numberDiff line numberDiff line change
@@ -17,53 +17,21 @@ jobs:
1717
with:
1818
dotnet-version: 5.0.x
1919

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-
5220
- name: Checkout repository
5321
id: checkout_repo
5422
uses: actions/checkout@v2
5523
with:
5624
token: ${{ secrets.GITHUB_TOKEN }}
5725
fetch-depth: 0
5826

59-
- if: steps.conditionals_handler.outputs.is_push_to_default_branch == 'true'
27+
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
6028
name: Bump GH tag
6129
id: tag_generator
6230
uses: mathieudutour/[email protected]
6331
with:
6432
github_token: ${{ secrets.GITHUB_TOKEN }}
6533
default_bump: false
66-
release_branches: ${{ steps.data_gatherer.outputs.default_branch }}
34+
release_branches: master
6735

6836
- name: Build projects
6937
id: build_projects

0 commit comments

Comments
 (0)