Skip to content

Commit

Permalink
Test release drafter
Browse files Browse the repository at this point in the history
  • Loading branch information
chongxiaoc committed Jul 29, 2021
1 parent a4b2baa commit fd65e9b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ on:
push:
branches:
- master
- actions_deploy
tags:
- "v*"
pull_request:
branches:
- master
- actions_deploy

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -136,8 +134,37 @@ jobs:
- name: codecov
run: codecov --required

draft_release:
#needs: unittest
# Only come with a tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Create release file
run: |
export VERSION_NUMBER=$(echo "${{ github.ref }}" | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p' | sed -e 's/\.//g')
echo "Version link appendix: ${VERSION_NUMBER}"
echo "https://github.com/chongxiaoc/petastorm/blob/master/docs/release-notes.rst#release-${VERSION_NUMBER}" > /tmp/release.md
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
[Release notes] ("https://github.com/chongxiaoc/petastorm/blob/master/docs/release-notes.rst#release-${VERSION_NUMBER}")
draft: false
prerelease: true # Set to false for a formal release

deploy:
needs: unittest
needs: draft_release
# Only come with a tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
Expand All @@ -157,8 +184,6 @@ jobs:
python setup.py bdist_wheel
- name: Publish package
# Only come with a tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down
5 changes: 4 additions & 1 deletion docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
Release notes
=============

Release 0.11.2 (unreleased)
Release 0.11.3 (unreleased)
===========================

Release 0.12.1
==============
- `PR ??? <https://github.com/uber/petastorm/pull/???>`_ (resolves issue
`#692 <https://github.com/uber/petastorm/issues/692>`_ ):
Python 3.9 compatibility - use `Thread`'s `is_alive()` instead of `isAlive()`.
Expand Down

0 comments on commit fd65e9b

Please sign in to comment.