Skip to content

added github workflow #3

added github workflow

added github workflow #3

Workflow file for this run

name: 'Release smud CLI'
on:
workflow_dispatch: # click the button on Github repo!
push:
branches: [main]
paths-ignore:
- "**/README.md"
jobs:
release_smud_cli:
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
timeout-minutes: 360
env:
BUILD_ID: ${{ github.run_number }}
name: Release smud CLI
steps:
# REQUIRED step
# Step 1: run a standard checkout action, provided by github
- name: Checkout target repo
uses: actions/checkout@v3
with:
# optional: set the branch to checkout,
# sync action checks out your 'target_sync_branch' anyway
ref: main
# REQUIRED if your upstream repo is private (see wiki)
persist-credentials: false
- name: Parse Changelog
id: changelog
uses: ocavue/changelog-parser-action@v1
with:
filePath: "./CHANGELOG.md"
- name: Export version to variable
run: echo "CLI_VERSION=${{ steps.changelog.outputs.latestVersion }}" >> $GITHUB_ENV
shell: bash
- name: Generate Changelog
run: curl -s https://api.github.com/repos/lensapp/lens/releases/latest | jq -r 'select(.prerelease == false) | .body[0:]' > ${{ github.workspace }}-CHANGELOG.txt
- name: Release
uses: softprops/[email protected]
if: github.ref == 'refs/heads/main'
with:
tag_name: v${{ env.CLI_VERSION }}-${{ env.BUILD_ID }}
body_path: ${{ github.workspace }}-CHANGELOG.txt
files: smud-cli/smud-cli/dist/smud-cli*${{ env.CLI_VERSION }}-${{ env.BUILD_ID }}*.*
- name: Latest
uses: softprops/[email protected]
if: github.ref == 'refs/heads/main'
with:
tag_name: Latest
files: |
smud-cli/smud-cli/dist/smud-cli*/OpenLens*${{ env.CLI_VERSION }}-${{ env.BUILD_ID }}*.*
#smud-cli/smud-cli/dist/smud-cli*/lates*.yml