Skip to content

Release

Release #17

Workflow file for this run

name: Release
permissions: write-all
on:
workflow_dispatch:
jobs:
test:
if: github.ref == 'refs/heads/main'
uses: newrelic/deployment-marker-action/.github/workflows/test.yml@main
secrets: inherit
release:
if: github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- name: Checkout code
uses: actions/checkout@v4
- name: Release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
git config --global user.name ${{ secrets.NEW_RELIC_GITHUB_SERVICE_ACCOUNT_USERNAME }}
git config --global user.email ${{ secrets.NEW_RELIC_GITHUB_SERVICE_ACCOUNT_EMAIL }}
./scripts/release-auto.sh
- name: Get Latest Tag
id: latest_tag
run: |
echo ::set-output name=tag::$(git describe --abbrev=0 --tags)
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ steps.latest_tag.outputs.tag }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.latest_tag.outputs.tag }}
release_name: ${{ steps.latest_tag.outputs.tag }}
draft: false
prerelease: false