|
1 | | -# This is a basic workflow to help you get started with Actions |
2 | | - |
3 | | -name: CI |
4 | | - |
5 | | -# Controls when the action will run. Triggers the workflow on push or pull request |
6 | | -# events but only for the master branch |
| 1 | +name: Make Zip |
7 | 2 | on: |
8 | 3 | push: |
9 | 4 | branches: [ master ] |
10 | | - pull_request: |
11 | | - branches: [ master ] |
12 | | - |
13 | | -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
14 | 5 | jobs: |
15 | | - # This workflow contains a single job called "build" |
16 | 6 | build: |
17 | | - # The type of runner that the job will run on |
18 | 7 | runs-on: ubuntu-latest |
19 | | - |
20 | | - # Steps represent a sequence of tasks that will be executed as part of the job |
21 | 8 | steps: |
22 | | - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
23 | 9 | - uses: actions/checkout@v2 |
24 | | - |
25 | | - # Runs a single command using the runners shell |
26 | | - - name: Run a one-line script |
27 | | - run: echo Hello, world! |
28 | | - |
29 | | - # Runs a set of commands using the runners shell |
30 | | - - name: Run a multi-line script |
31 | | - run: | |
32 | | - echo Add other actions to build, |
33 | | - echo test, and deploy your project. |
| 10 | + - name: Archive Release |
| 11 | + uses: thedoctor0/zip-release@master |
| 12 | + with: |
| 13 | + filename: EzMonitor.zip |
| 14 | + exclusions: '*.git* .vscode README.md azuredeploy.json' |
| 15 | + - name: Delete latest release |
| 16 | + uses: ame-yu/action-delete-latest-release@v2 |
| 17 | + with: |
| 18 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 19 | + - name: Create Release |
| 20 | + id: create_release |
| 21 | + uses: actions/create-release@v1 |
| 22 | + env: |
| 23 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 24 | + with: |
| 25 | + tag_name: latest |
| 26 | + draft: false |
| 27 | + - name: Upload release |
| 28 | + uses: actions/upload-release-asset@v1.0.2 |
| 29 | + env: |
| 30 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 31 | + with: |
| 32 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 33 | + asset_path: ./EzMonitor.zip |
| 34 | + asset_name: EzMonitor.zip |
| 35 | + asset_content_type: application/zip |
0 commit comments