Add files via upload
This commit is contained in:
38
.github/workflows/test_relase.yml
vendored
Normal file
38
.github/workflows/test_relase.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: test release
|
||||
on:
|
||||
watch:
|
||||
types: [started]
|
||||
jobs:
|
||||
Ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build project # This would actually build your project, using zip for an example artifact
|
||||
id: assemble_artifact
|
||||
run: |
|
||||
mkdir my-artifact && touch my-artifact/tf
|
||||
zip -r artifact.zip my-artifact
|
||||
release_tag="R2S-Lean-$(date +%Y-%m-%d)"
|
||||
echo "##[set-output name=release_tag;]$release_tag"
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.assemble_artifact.outputs.release_tag }}
|
||||
release_name: 自动发布 ${{ steps.assemble_artifact.outputs.release_tag }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- 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: ./artifact.zip
|
||||
asset_name: ${{ steps.assemble_artifact.outputs.release_tag }}-ROM.zip
|
||||
asset_content_type: application/zip
|
||||
Reference in New Issue
Block a user