Skip to content

build: replace hub command with gh #61

build: replace hub command with gh

build: replace hub command with gh #61

Workflow file for this run

# SPDX-FileCopyrightText: © Vegard IT GmbH (https://vegardit.com)
# SPDX-FileContributor: Sebastian Thomschke
# SPDX-License-Identifier: Apache-2.0
# SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/activemq-artemis-dynatrace-plugin
#
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
name: Build
on:
push:
branches: # build all branches
- '**'
tags-ignore: # but don't build tags
- '**'
paths:
- '.github/workflows/build.yml'
- '**/plugin.yaml'
pull_request:
paths:
- '**/plugin.yaml'
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4 #https://github.com/actions/checkout
- name: Setup yq
uses: vegardit/gha-setup-yq@v1
- name: Generate plugin zip files
run: |
DEBUG=1 bash build.sh
- name: "Delete previous 'latest' release"
if: ${{ github.ref_name == 'main' && !env.ACT }} # https://github.com/nektos/act#skipping-steps
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: latest
# https://cli.github.com/manual/gh_release_delete
run: gh release delete "$RELEASE_NAME" --yes --cleanup-tag || true
- name: "Create 'latest' release"
if: ${{ github.ref_name == 'main' && !env.ACT }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: latest
# https://cli.github.com/manual/gh_release_create
run: |
gh release create "$RELEASE_NAME" \
--latest \
--target "${{ github.sha }}" \
--notes "$RELEASE_NAME" \
work/artemis-overview-plugin-latest.zip \
work/artemis-queues-plugin-latest.zip