Skip to content

Commit

Permalink
[ADD] Generate release
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarrc committed Feb 6, 2024
1 parent 96e8a1a commit c66ee2b
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,30 @@ jobs:
context: .
platforms: linux/amd64
push: true
tags: ghcr.io${{ github.repository }}:latest, ghcr.io${{ github.repository }}:${{ github.ref_name }}
tags: ghcr.io${{ github.repository }}:latest, ghcr.io${{ github.repository }}:${{ github.ref_name }}
release:
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 c66ee2b

Please sign in to comment.