Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ODH release workflow #17

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/odh-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will handle the release process

name: ODH Release
on:
workflow_dispatch:
inputs:
version:
description: 'Tag to be used for release, i.e.: v0.0.1-odh-1'
required: true
push:
tags:
- '*'
jobs:
release-odh:
runs-on: ubuntu-latest

# Permission required to create a release
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Set Go
uses: actions/setup-go@v5
with:
go-version-file: './go.mod'

- name: Verify that release doesn't exist yet
shell: bash {0}
run: |
gh release view ${{ github.event.inputs.version }}
status=$?
if [[ $status -eq 0 ]]; then
echo "Release ${{ github.event.inputs.version }} already exists."
exit 1
fi
env:
GITHUB_TOKEN: ${{ github.TOKEN }}

- name: Creates a release in GitHub
run: |
gh release create ${{ github.event.inputs.version }} --target ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
shell: bash
Loading