ci: use actions/create-release
for https://github.com/haishanh/yacd/issues/545
This commit is contained in:
parent
05382507f7
commit
5f13819f52
2 changed files with 30 additions and 3 deletions
27
.github/workflows/push.yml
vendored
27
.github/workflows/push.yml
vendored
|
@ -33,7 +33,32 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
||||||
##### gh-pages
|
- name: Create Release
|
||||||
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: ${{ github.ref }}
|
||||||
|
draft: true
|
||||||
|
prerelease: false
|
||||||
|
- name: Create Tar Ball
|
||||||
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
run: tar cJv yacd.tar.xz public
|
||||||
|
- name: Upload Release Asset
|
||||||
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
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 }}
|
||||||
|
asset_path: ./yacd.tar.xz
|
||||||
|
asset_name: yacd.tar.xz
|
||||||
|
asset_content_type: application/x-gzip
|
||||||
|
|
||||||
- name: Push to gh-pages
|
- name: Push to gh-pages
|
||||||
if: github.event_name == 'push' && (startsWith(github.event.ref, 'refs/tags/') || github.event.ref == 'refs/heads/publish')
|
if: github.event_name == 'push' && (startsWith(github.event.ref, 'refs/tags/') || github.event.ref == 'refs/heads/publish')
|
||||||
env:
|
env:
|
||||||
|
|
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,5 +1,9 @@
|
||||||
*.
|
*.
|
||||||
!.eslintrc.yml
|
!.eslintrc.yml
|
||||||
|
*.tar.gz
|
||||||
|
*.tar.xz
|
||||||
|
*.log
|
||||||
|
!.github
|
||||||
|
|
||||||
node_modules/
|
node_modules/
|
||||||
public/
|
public/
|
||||||
|
@ -7,5 +11,3 @@ experimental/
|
||||||
deploy_ghpages.sh
|
deploy_ghpages.sh
|
||||||
tags
|
tags
|
||||||
.eslintcache
|
.eslintcache
|
||||||
*.log
|
|
||||||
!.github
|
|
||||||
|
|
Loading…
Reference in a new issue