Skip to content

Commit

Permalink
fix release
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronoff97 committed Apr 4, 2024
1 parent 3d86945 commit 04a0424
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 55 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Generate Release"

on:
workflow_dispatch:
inputs:
version:
description: "Tag Version x.x.x"
required: true
type: string
jobs:
publish:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Generate Release
run: |
gh release create \
-t "Release v${{ github.event.inputs.version }}" \
--generate-notes \
--draft \
"v${{ github.event.inputs.version }}"
24 changes: 0 additions & 24 deletions .github/workflows/create-tag.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,34 +56,3 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
release:
needs: build-and-push-image
name: "Release"
if: github.ref_type == 'tag'
runs-on: "ubuntu-latest"

steps:
- name: "Determine tag"
run: 'echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV'

- name: "Create release"
uses: "actions/github-script@v6"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
try {
const response = await github.rest.repos.createRelease({
draft: false,
generate_release_notes: true,
name: process.env.RELEASE_TAG,
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
tag_name: process.env.RELEASE_TAG,
});
core.exportVariable('RELEASE_ID', response.data.id);
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url);
} catch (error) {
core.setFailed(error.message);
}

0 comments on commit 04a0424

Please sign in to comment.