Skip to content

Attempt to trigger workflow #3

Attempt to trigger workflow

Attempt to trigger workflow #3

Workflow file for this run

# This defines a workflow to build and release a new version of the Movement CLI.
# In order to trigger it go to the Actions Tab of the Repo, click "Release CLI" and then "Run Workflow".
name: "Release CLI"
on:
workflow_dispatch:
inputs:
release_version:
type: string
required: true
description: "The release version. E.g. `0.2.3`:"
source_git_ref_override:
type: string
required: false
description: "GIT_SHA_OVERRIDE: Use this to override the Git SHA1, branch name (e.g. devnet) or tag to build the binaries from. Defaults to the workflow Git REV, but can be different than that:"
dry_run:
type: boolean
required: false
default: true
description: "Dry run - If checked, the release will not be created"
push:
branches:
- andygolay/movement-cli-release
jobs:
set-defaults:
runs-on: ubuntu-latest
outputs:
release_version: ${{ steps.set-defaults.outputs.release_version }}
source_git_ref_override: ${{ steps.set-defaults.outputs.source_git_ref_override }}
dry_run: ${{ steps.set-defaults.outputs.dry_run }}
steps:
- name: Set default values
id: set-defaults
run: |
echo "::set-output name=release_version::${{ github.event.inputs.release_version || 'default-release-version' }}"
echo "::set-output name=source_git_ref_override::${{ github.event.inputs.source_git_ref_override || github.sha }}"
echo "::set-output name=dry_run::${{ github.event.inputs.dry_run || 'true' }}"
build-ubuntu20-binary:
name: "Build Ubuntu 20.04 binary"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.source_git_ref_override }}
- uses: movementlabsxyz/aptos-core/.github/actions/rust-setup@andygolay/movement-cli-release
- name: Build CLI
run: scripts/cli/build_cli_release.sh "Ubuntu"
- name: Upload Binary
uses: actions/upload-artifact@v3
with:
name: cli-builds
path: movement-cli-*.zip
build-ubuntu22-binary:
name: "Build Ubuntu 22.04 binary"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.source_git_ref_override }}
- uses: movementlabsxyz/aptos-core/.github/actions/rust-setup@andygolay/movement-cli-release
- name: Build CLI
run: scripts/cli/build_cli_release.sh "Ubuntu-22.04"
- name: Upload Binary
uses: actions/upload-artifact@v3
with:
name: cli-builds
path: movement-cli-*.zip
build-windows-binary:
name: "Build Windows binary"
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.source_git_ref_override }}
- name: Build CLI
run: scripts\cli\build_cli_release.ps1
- name: Upload Binary
uses: actions/upload-artifact@v3
with:
name: cli-builds
path: movement-cli-*.zip
release-binaries:
name: "Release binaries"
needs:
- build-ubuntu20-binary
- build-ubuntu22-binary
- build-windows-binary
runs-on: ubuntu-latest
permissions:
contents: "write"
pull-requests: "read"
if: ${{ inputs.dry_run }} == 'false'
steps:
- name: Download prebuilt binaries
uses: actions/download-artifact@v3
with:
name: cli-builds
- name: Create GitHub Release
uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 # pin@v1.2.1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ format('movement-cli-v{0}', inputs.release_version) }}"
prerelease: false
title: "${{ format('Movement CLI Release v{0}', inputs.release_version) }}"
files: |
movement-cli-*.zip
#bump-homebrew-version-pr:
# name: "Make PR to bump version in Homebrew"
# needs:
# - release-binaries
# runs-on: ubuntu-latest
# steps:
# - uses: mislav/bump-homebrew-formula-action@v3
# with:
# formula-name: aptos
# tag-name: "${{ format('aptos-cli-v{0}', inputs.release_version) }}"
# base-branch: master
# create-pullrequest: true
# commit-message: |
# {{formulaName}} {{version}}
#
# Created by https://github.com/mislav/bump-homebrew-formula-action
#
# From CLI release run ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
# env:
# COMMITTER_TOKEN: ${{ secrets.APTOS_BOT_GH_PAT_APTOS_CORE_HOMEBREW_BUMPER }}