Skip to content

Commit

Permalink
Merge pull request #403 from ProjectQ-Framework/hotfix/0.6.1
Browse files Browse the repository at this point in the history
Fix publishing GitHub workflow
  • Loading branch information
Takishima committed Jun 23, 2021
2 parents 76f4809 + 62fd632 commit 532bfda
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
42 changes: 34 additions & 8 deletions .github/workflows/publish_release.yml
Expand Up @@ -27,32 +27,58 @@ jobs:
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Extract version from tag name
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
- name: Extract version from tag name (Unix)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && runner.os != 'Windows'
run: |
TAG_NAME="${GITHUB_REF/refs\/tags\//}"
VERSION=${TAG_NAME#v}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- name: Extract version from branch name (for release branches)
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/')
- name: Extract version from branch name (for release branches) (Unix)
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/') && runner.os != 'Windows'
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
git tag v${RELEASE_VERSION} master
- name: Extract version from branch name (for hotfix branches)
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'hotfix/')
- name: Extract version from branch name (for hotfix branches) (Unix)
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'hotfix/') && runner.os != 'Windows'
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#hotfix/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
git tag v${RELEASE_VERSION} master
- name: Extract version from tag name (Windows)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows'
run: |
$TAG_NAME = $GITHUB_REF -replace "refs/tags/",""
$VERSION = $TAG_NAME -replace "v",""
Write-Output "RELEASE_VERSION=$VERSION"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Extract version from branch name (for release branches) (Windows)
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/') && runner.os == 'Windows'
run: |
$BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
$VERSION = $BRANCH_NAME -replace "release/",""
Write-Output "RELEASE_VERSION=$VERSION"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
git tag v${RELEASE_VERSION} master
- name: Extract version from branch name (for hotfix branches) (Unix)
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'hotfix/') && runner.os == 'Windows'
run: |
$BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
$VERSION = $BRANCH_NAME -replace hotfix/",""
- name: Set tag for setuptools-scm
run: git tag v${RELEASE_VERSION} master
Write-Output "RELEASE_VERSION=$VERSION"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
git tag v${RELEASE_VERSION} master
- name: Build wheels
uses: joerick/cibuildwheel@v1.11.1
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Repository

## [0.6.1] - 2021-06-23

### Repository

- Fix GitHub workflow for publishing a new release

## [0.6.0] - 2021-06-23

### Added
Expand Down

0 comments on commit 532bfda

Please sign in to comment.