Skip to content

Commit

Permalink
Create and upload to releases
Browse files Browse the repository at this point in the history
  • Loading branch information
stellaraccident committed Dec 31, 2020
1 parent 0bdde2f commit 1290bda
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build_mlir.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Build MLIR Wheels

on:
push:
branches: ['cidev']
workflow_dispatch:
inputs:
package_suffix:
Expand All @@ -13,6 +11,10 @@ on:
description: 'Version of the package'
required: true
default: '0.1a1'
release_id:
description: 'Release id to upload artifacts to'
required: true
default: ''

jobs:
build_wheels:
Expand Down Expand Up @@ -101,3 +103,13 @@ jobs:
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

- name: Upload Release Assets
if: github.event.inputs.release_id != ''
id: upload-release-assets
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }}
with:
release_id: ${{ github.event.inputs.release_id }}
assets_path: ./wheelhouse/*.whl
15 changes: 14 additions & 1 deletion .github/workflows/bump_revisions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,24 @@ jobs:
branch: main
tags: true

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }}
with:
tag_name: ${{ env.tag_name }}
release_name: mlir binaries ${{ env.tag_name }}
body: |
Automatic release of llvm-project@${{ env.llvm_head }}
draft: true
prerelease: false

- name: "Invoke workflow :: Build MLIR Wheels"
if: "env.has_diff == 'true' || github.event.inputs.force_workflow == 'true'"
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Build MLIR Wheels
token: ${{ secrets.WRITE_ACCESS_TOKEN }}
ref: "${{ env.tag_name }}"
inputs: '{"package_suffix": "-snapshot", "package_version": "${{ env.package_version }}"}'
inputs: '{"package_suffix": "-snapshot", "package_version": "${{ env.package_version }}", "release_id": "${{ steps.create_release.outputs.id }}"}'

0 comments on commit 1290bda

Please sign in to comment.