-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
501b5cd
commit 4364eb1
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Release | ||
|
||
# 用于发布release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version_tag: | ||
description: '' | ||
required: true | ||
default: 'v' | ||
prerelease: | ||
description: '' | ||
required: true | ||
default: 'false' | ||
techxuexi_text: | ||
description: '' | ||
required: true | ||
default: '交流群: https://github.com/TechXueXi/TechXueXi/issues/14 ,使用方法:https://github.com/TechXueXi/techxuexi-js' | ||
|
||
|
||
jobs: | ||
Release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Get tag | ||
id: tag | ||
run: | | ||
echo ::set-output name=tag::${GITHUB_REF#refs/tags/} | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.inputs.version_tag }} | ||
release_name: ${{ github.event.inputs.version_tag }} | ||
draft: false | ||
prerelease: ${{ github.event.inputs.prerelease }} | ||
body: ${{ github.event.inputs.techxuexi_text }} | ||
- name: Sleep for 30 seconds | ||
uses: jakejarvis/wait-action@master | ||
with: | ||
time: '10m' | ||
- uses: actions/checkout@master | ||
- name: 1 | ||
env: | ||
UPDATE_1: ${{ secrets.UPDATE_1 }} | ||
run: | | ||
wget ${{ secrets.UPDATE_1 }} | ||
- name: Delete Workflow Runs | ||
uses: Mattraks/delete-workflow-runs@main | ||
with: | ||
token: ${{ github.token }} | ||
repository: ${{ github.repository }} | ||
retain_days: 1 | ||
keep_minimum_runs: 0 | ||
|