Skip to content
Open
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ jobs:
id: version

- name: Run GoReleaser
# GoReleaser v4.2.0
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b
# GoReleaser v7.2.2
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89
if: startsWith(github.ref, 'refs/tags/')
with:
version: 1.16.2
args: release --rm-dist --debug ${{ env.SKIP_PUBLISH }}
version: "~> v2"
args: release --clean --verbose ${{ env.SKIP_PUBLISH }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.TAG_NAME }}
- uses: actions/github-script@v4
- uses: actions/github-script@v9
id: get-checksums-from-draft-release
if: startsWith(github.ref, 'refs/tags/') && ${{ !env.ACT }}
Comment on lines +40 to 42
with:
Expand All @@ -49,7 +49,7 @@ jobs:

// https://docs.github.com/en/rest/reference/repos#list-releases
// https://octokit.github.io/rest.js/v18#repos-list-releases
var releases = await github.repos.listReleases({
var releases = await github.rest.repos.listReleases({
owner: owner,
repo: repo
});
Expand All @@ -63,7 +63,7 @@ jobs:
for (const r of releases["data"]) {
if (r.draft && `refs/tags/${r.tag_name}` == "${{ github.ref }}") {
for (const asset of r.assets) {
var release_asset = await github.repos.getReleaseAsset({ headers: {accept: `application/octet-stream`}, accept: `application/octet-stream`, owner: owner, repo: repo, asset_id: asset.id });
var release_asset = await github.rest.repos.getReleaseAsset({ headers: {accept: `application/octet-stream`}, accept: `application/octet-stream`, owner: owner, repo: repo, asset_id: asset.id });
const hash = crypto.createHash('sha256');

let http_promise = new Promise((resolve, reject) => {
Expand Down
10 changes: 3 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
version: 2
builds:
- env:
- CGO_ENABLED=0
Expand All @@ -25,11 +26,6 @@ builds:
archives:
- format: binary
name_template: "{{ .Binary }}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
checksum:
name_template: 'checksums.txt'
algorithm: sha256
Expand All @@ -46,7 +42,7 @@ signs:
- '${artifact}'
output: true
snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Tag }}-next"
release:
# Repo in which the release will be created.
github:
Expand Down Expand Up @@ -129,7 +125,7 @@ release:
changelog:
# Set it to true if you wish to skip the changelog generation.
# This may result in an empty release notes on GitHub/GitLab/Gitea.
skip: false
disable: false

# Sorts the changelog by the commit's messages.
# Could either be asc, desc or empty
Expand Down
Loading