|
1 | 1 | name: 'Release' |
2 | 2 |
|
3 | 3 | on: |
4 | | - pull_request_target: |
5 | | - types: [closed] |
| 4 | + push: |
6 | 5 | branches: |
7 | 6 | - 'preview/**' |
8 | 7 | - 'release/**' |
@@ -33,20 +32,15 @@ jobs: |
33 | 32 | runs-on: ubuntu-latest |
34 | 33 |
|
35 | 34 | outputs: |
36 | | - is-release: ${{ startsWith(github.base_ref, 'release') }} |
37 | | - is-preview: ${{ startsWith(github.base_ref, 'preview') }} |
| 35 | + is-release: ${{ startsWith(github.ref, 'release') }} |
| 36 | + is-preview: ${{ startsWith(github.ref, 'preview') }} |
38 | 37 |
|
39 | 38 | steps: |
40 | | - - name: '' |
41 | | - run: | |
42 | | - echo 'github.ref ${{ github.ref}}' |
43 | | - echo 'github.head_ref ${{ github.head_ref}}' |
44 | | - echo 'github.base_ref ${{ github.base_ref}}' |
45 | 39 | - name: 'Set workflow variables' |
46 | 40 | id: github |
47 | 41 | run: | |
48 | | - echo "is-release:${{ startsWith(github.base_ref, 'release') }}" |
49 | | - echo "is-preview:${{ startsWith(github.base_ref, 'preview') }}" |
| 42 | + echo "is-release:${{ startsWith(github.ref, 'release') }}" |
| 43 | + echo "is-preview:${{ startsWith(github.ref, 'preview') }}" |
50 | 44 |
|
51 | 45 | validate-release: |
52 | 46 | name: 'Validate release' |
|
85 | 79 | id: extract-version |
86 | 80 | uses: './.github/actions/versioning/extract-version' |
87 | 81 | with: |
88 | | - branch-name: ${{ github.base_ref }} |
| 82 | + branch-name: ${{ github.ref }} |
89 | 83 | - name: 'Create build number' |
90 | 84 | shell: bash |
91 | 85 | id: create-build-number |
|
105 | 99 | pre_release_tag='preview' |
106 | 100 | echo "pre-release-tag=$pre_release_tag" >> $GITHUB_OUTPUT |
107 | 101 | else |
108 | | - pre_release_tag=$(echo ${{ github.base_ref }} | tr '/' '-' | tr '.' '-'| tr '_' '-') |
| 102 | + pre_release_tag=$(echo ${{ github.ref }} | tr '/' '-' | tr '.' '-'| tr '_' '-') |
109 | 103 | echo "pre-release-tag=$pre_release_tag" >> $GITHUB_OUTPUT |
110 | 104 | fi |
111 | 105 | - name: 'Format version' |
@@ -194,8 +188,6 @@ jobs: |
194 | 188 | steps: |
195 | 189 | - name: 'Checkout ${{ github.base_ref }}' |
196 | 190 | uses: actions/checkout@v5 |
197 | | - with: |
198 | | - ref: '${{ github.base_ref }}' |
199 | 191 |
|
200 | 192 | - name: Setup .NET |
201 | 193 | uses: actions/setup-dotnet@v5 |
|
0 commit comments