Skip to content

Commit

Permalink
[MOD] Release creation
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarrc committed Feb 6, 2024
1 parent 7266ed0 commit 0cc491b
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ jobs:
platforms: linux/amd64
push: true
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"
- name: Create release
uses: "actions/github-script@v6"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -41,15 +36,16 @@ jobs:
const response = await github.rest.repos.createRelease({
draft: false,
generate_release_notes: true,
name: process.env.RELEASE_TAG,
name: ${{ github.ref_name }},
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
tag_name: process.env.RELEASE_TAG,
tag_name: ${{ github.ref_name }},
});
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 0cc491b

Please sign in to comment.