Skip to content

Adding Endpoint for Zone Details in vinyldns-cli #31

Adding Endpoint for Zone Details in vinyldns-cli

Adding Endpoint for Zone Details in vinyldns-cli #31

Workflow file for this run

name: Build and Release
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: get-version
run: echo "::set-output name=CURRENT_VERSION::$(cat Makefile | head -n1 | awk -F= '{print $2}')"
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Setup docker-compose compatibility
run: |
mkdir -p $HOME/bin
echo '#!/bin/sh' > $HOME/bin/docker-compose
echo 'exec docker compose "$@"' >> $HOME/bin/docker-compose
chmod +x $HOME/bin/docker-compose
echo "$HOME/bin" >> $GITHUB_PATH
- name: Build
run: make
- name: Create and Push Tag
# Only create and push tag on push to the main branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag v${{ steps.get-version.outputs.CURRENT_VERSION }}
git push origin v${{ steps.get-version.outputs.CURRENT_VERSION }}
- name: Wait for tag to register
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: sleep 20
- name: Create Release
# Only create a release on push to the main branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: softprops/action-gh-release@v2
with:
name: Release v${{ steps.get-version.outputs.CURRENT_VERSION }}
tag_name: v${{ steps.get-version.outputs.CURRENT_VERSION }}
draft: true
prerelease: true
files: release/*.tar.gz