Skip to content

Commit 1ff10be

Browse files
committed
Merge pull request #403 from ProjectQ-Framework/hotfix/0.6.1
Fix publishing GitHub workflow
2 parents 76f4809 + 62fd632 commit 1ff10be

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

.github/workflows/publish_release.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,58 @@ jobs:
2727
git fetch --prune --unshallow
2828
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2929
30-
- name: Extract version from tag name
31-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
30+
- name: Extract version from tag name (Unix)
31+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && runner.os != 'Windows'
3232
run: |
3333
TAG_NAME="${GITHUB_REF/refs\/tags\//}"
3434
VERSION=${TAG_NAME#v}
3535
3636
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
3737
38-
- name: Extract version from branch name (for release branches)
39-
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/')
38+
- name: Extract version from branch name (for release branches) (Unix)
39+
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/') && runner.os != 'Windows'
4040
run: |
4141
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
4242
VERSION=${BRANCH_NAME#release/}
4343
4444
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
45+
git tag v${RELEASE_VERSION} master
4546
46-
- name: Extract version from branch name (for hotfix branches)
47-
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'hotfix/')
47+
- name: Extract version from branch name (for hotfix branches) (Unix)
48+
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'hotfix/') && runner.os != 'Windows'
4849
run: |
4950
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
5051
VERSION=${BRANCH_NAME#hotfix/}
5152
5253
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
54+
git tag v${RELEASE_VERSION} master
55+
56+
57+
- name: Extract version from tag name (Windows)
58+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows'
59+
run: |
60+
$TAG_NAME = $GITHUB_REF -replace "refs/tags/",""
61+
$VERSION = $TAG_NAME -replace "v",""
62+
63+
Write-Output "RELEASE_VERSION=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
64+
65+
- name: Extract version from branch name (for release branches) (Windows)
66+
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/') && runner.os == 'Windows'
67+
run: |
68+
$BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
69+
$VERSION = $BRANCH_NAME -replace "release/",""
70+
71+
Write-Output "RELEASE_VERSION=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
72+
git tag v${RELEASE_VERSION} master
73+
74+
- name: Extract version from branch name (for hotfix branches) (Unix)
75+
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'hotfix/') && runner.os == 'Windows'
76+
run: |
77+
$BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
78+
$VERSION = $BRANCH_NAME -replace "hotfix/",""
5379
54-
- name: Set tag for setuptools-scm
55-
run: git tag v${RELEASE_VERSION} master
80+
Write-Output "RELEASE_VERSION=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
81+
git tag v${RELEASE_VERSION} master
5682
5783
- name: Build wheels
5884
uses: joerick/cibuildwheel@v1.11.1

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Removed
1515
### Repository
1616

17+
## [0.6.1] - 2021-06-23
18+
19+
### Repository
20+
21+
- Fix GitHub workflow for publishing a new release
22+
1723
## [0.6.0] - 2021-06-23
1824

1925
### Added

0 commit comments

Comments
 (0)