mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-20 13:00:32 +08:00
Update action for GitHub releases
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
name: Publish distributions to TestPyPI and PyPI
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
create:
|
||||
tags:
|
||||
- v*.*.*
|
||||
|
||||
jobs:
|
||||
build-n-publish:
|
||||
@@ -32,20 +32,19 @@ jobs:
|
||||
- name: Verify the distributions
|
||||
run: twine check dist/*
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: distribution
|
||||
path: dist/
|
||||
|
||||
- name: Publish distribution to Test PyPI
|
||||
uses: pypa/gh-action-pypi-publish@v1.4.1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.TEST_PYPI_PASSWORD }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
- name: Install ghr
|
||||
run: |
|
||||
wget https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
|
||||
tar -xzf ghr_v*_linux_amd64.tar.gz
|
||||
- name: Create GitHub release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
export TAGNAME=$(jq --raw-output .ref "$GITHUB_EVENT_PATH")
|
||||
./ghr_v0.13.0_linux_amd64/ghr -n ${TAGNAME} -b ${TAGNAME} -draft ${TAGNAME} dist/
|
||||
|
||||
- name: Publish distribution to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@v1.4.1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_PASSWORD }}
|
||||
password: ${{ secrets.PYPI_PASSWORD }}
|
||||
|
||||
Reference in New Issue
Block a user