forked from llvm/torch-mlir
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This closely follows IREE's [schedule_snapshot_release.yml](https://github.com/google/iree/blob/f2f153d39472b3abb1b629517e3b2c0bb1812c77/.github/workflows/schedule_snapshot_release.yml#L1) workflow. The snapshot releases can be installed with: ``` python -m pip install torch_mlir -f "https://github.com/llvm/torch-mlir/releases" ```
- Loading branch information
Showing
4 changed files
with
129 additions
and
30 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
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,59 @@ | ||
name: Release snapshot package | ||
|
||
on: | ||
schedule: | ||
- cron: '0 10,22 * * *' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
release_snapshot_package: | ||
name: "Tag snapshot release" | ||
runs-on: ubuntu-20.04 | ||
# Don't run this in everyone's forks. | ||
if: github.repository == 'llvm/torch-mlir' | ||
steps: | ||
- name: Checking out repository | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.WORKFLOW_INVOCATION_TOKEN }} | ||
|
||
- name: Compute version | ||
run: | | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
package_version="$(printf '%(%Y%m%d)T.${{ github.run_number }}')" | ||
tag_name="snapshot-${package_version}" | ||
echo "package_version=${package_version}" >> $GITHUB_ENV | ||
echo "tag_name=${tag_name}" >> $GITHUB_ENV | ||
- name: Updating snapshot tag | ||
run: | | ||
git tag "${tag_name}" | ||
- name: Pushing changes | ||
uses: ad-m/github-push-action@v0.6.0 | ||
with: | ||
github_token: ${{ secrets.WORKFLOW_INVOCATION_TOKEN }} | ||
branch: main | ||
tags: true | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_INVOCATION_TOKEN }} | ||
with: | ||
tag_name: ${{ env.tag_name }} | ||
release_name: torch-mlir snapshot ${{ env.tag_name }} | ||
body: | | ||
Automatic snapshot release of torch-mlir. | ||
draft: true | ||
prerelease: true | ||
|
||
- name: "Invoke workflow :: Build and Test" | ||
uses: benc-uk/workflow-dispatch@v1 | ||
with: | ||
workflow: Build and Test | ||
token: ${{ secrets.WORKFLOW_INVOCATION_TOKEN }} | ||
ref: "${{ env.tag_name }}" | ||
inputs: '{"release_id": "${{ steps.create_release.outputs.id }}"}' |
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
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