Skip to content

Commit

Permalink
Release part a
Browse files Browse the repository at this point in the history
  • Loading branch information
daggy1234 committed Mar 3, 2021
1 parent c9a3a7a commit 3a8d812
Showing 1 changed file with 41 additions and 28 deletions.
69 changes: 41 additions & 28 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: CI
on: push

on:
push:
tags:
- "*"
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
name: Build wheels on ${{ matrix.os }} - ${{ matrix.vers }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -98,28 +100,39 @@ jobs:
- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
# release:
# needs: [build_wheels, build_sdist]
# runs-on: ubuntu-latest
# steps:
# - 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: |
# Changes in this Release
# - Read the CHANGELOG.md
# draft: false
# prerelease: false
# - uses: actions/download-artifact@v2
# with:
# name: artifact
# path: dist
# - uses: pypa/gh-action-pypi-publish@master
# with:
# user: __token__
# password: ${{ secrets.pypi_password }}
release:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- 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 }}
draft: false
body_path: CHANGELOG.md
prerelease: false

- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: dist/*
asset_name: Wheels
asset_content_type: application/zip

- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}

0 comments on commit 3a8d812

Please sign in to comment.