Skip to content

Commit

Permalink
create release
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Feb 20, 2021
1 parent d815ba6 commit fc2a016
Showing 1 changed file with 45 additions and 5 deletions.
50 changes: 45 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
name: release
on: [push, pull_request]
#on:
#push:
#tags:
#- '*'
#on: [push, pull_request]
on:
push:
tags:
- '*'

jobs:
setup:
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.get_version.outputs.VERSION }}
steps:
- name: get-version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

android:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -55,3 +64,34 @@ jobs:
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}.zip

release:
needs: [setup, android]
runs-on: ubuntu-latest
steps:
- name: download
uses: actions/download-artifact@v2
with:
path: artifacts

- name: create-release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.setup.outputs.VERSION }}
release_name: Release ${{ needs.setup.outputs.VERSION }}
draft: false
prerelease: false

- name: upload-android
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGENAME: valgrind-3.16.1-android
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/${{ env.PACKAGENAME }}/${{ env.PACKAGENAME }}.zip
asset_name: ${{ env.PACKAGENAME }}.zip
asset_content_type: application/zip

0 comments on commit fc2a016

Please sign in to comment.