From fe9ae078e72f3a93f8f31270beaf1b4735d0221d Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Sat, 9 Oct 2021 17:44:26 +0200 Subject: [PATCH] Work on authentication for release-notes.rb --- .github/workflows/build.yml | 2 ++ Scripts/release-notes.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d8710c..abe9964 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,8 @@ jobs: - name: Release | Setup if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/develop' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | Scripts/release-notes.rb Scripts/release-notes.rb > build/Release/Release-notes.md diff --git a/Scripts/release-notes.rb b/Scripts/release-notes.rb index e8cc366..29f4dbe 100755 --- a/Scripts/release-notes.rb +++ b/Scripts/release-notes.rb @@ -7,7 +7,7 @@ if ENV['GITHUB_TOKEN'] != '' all_releases = open('https://api.github.com/repos/griff/metaz/releases', - http_basic_authentication: ['griff', ENV['GITHUB_TOKEN']] ) do |f| + "authorization" => "Bearer " + ENV['GITHUB_TOKEN']) do |f| JSON.parse(f.read, symbolize_names: true) end else