From 589eb230e906c7cb664fb33e822affba741fa0ea Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Fri, 23 Apr 2021 13:14:06 -0700 Subject: [PATCH 1/3] /.github/workflows/cd-release.yaml: fix step name --- .github/workflows/cd-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-release.yaml b/.github/workflows/cd-release.yaml index fbe8bd331a..2716e1bc7e 100644 --- a/.github/workflows/cd-release.yaml +++ b/.github/workflows/cd-release.yaml @@ -84,7 +84,7 @@ jobs: needs: create-release runs-on: ubuntu-18.04 steps: - - name: Repository Dispatch + - name: Checkout Release Notes Generator uses: actions/checkout@v2 with: repository: dolthub/release-notes-generator From fc749c072c6315184fdc402743e4f6c89a727c7a Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Fri, 23 Apr 2021 13:32:05 -0700 Subject: [PATCH 2/3] /.github/workflows/cd-release.yaml: export env var --- .github/workflows/cd-release.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd-release.yaml b/.github/workflows/cd-release.yaml index 2716e1bc7e..56e11b2208 100644 --- a/.github/workflows/cd-release.yaml +++ b/.github/workflows/cd-release.yaml @@ -90,7 +90,9 @@ jobs: repository: dolthub/release-notes-generator token: ${{ secrets.REPO_ACCESS_TOKEN }} - name: Install Dependencies - run: PERL_MM_USE_DEFAULT=1 ./install-deps.sh + run: ./install-deps.sh + env: + PERL_MM_USE_DEFAULT: 1 - name: Create Notes run: | ./gen_release_notes.pl \ From 156e2046bca8bc100df36a3ad4a9f23702171d15 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Fri, 23 Apr 2021 13:44:18 -0700 Subject: [PATCH 3/3] testing install stuff; --- .github/workflows/cd-release.yaml | 149 +++++++++++++++--------------- 1 file changed, 77 insertions(+), 72 deletions(-) diff --git a/.github/workflows/cd-release.yaml b/.github/workflows/cd-release.yaml index 56e11b2208..beca66dc7e 100644 --- a/.github/workflows/cd-release.yaml +++ b/.github/workflows/cd-release.yaml @@ -8,47 +8,48 @@ on: required: true jobs: - create-release: - name: Create release - runs-on: ubuntu-18.04 - outputs: - release_id: ${{ steps.create_release.outputs.id }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Update dolt version command - run: sed -i -e 's/ Version = ".*"/ Version = "'"$NEW_VERSION"'"/' "$FILE" - env: - FILE: ${{ format('{0}/go/cmd/dolt/dolt.go', github.workspace) }} - NEW_VERSION: ${{ github.event.inputs.version }} - - uses: EndBug/add-and-commit@v7 - with: - message: ${{ format('[ga-bump-release] Update Dolt version to {0} and release v{0}', github.event.inputs.version) }} - add: ${{ format('{0}/go/cmd/dolt/dolt.go', github.workspace) }} - cwd: "." - - name: Build Binaries - run: | - GO_BUILD_VERSION=1.15.11 go/utils/publishrelease/buildbinaries.sh - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: v${{ github.event.inputs.version }} - release_name: ${{ github.event.inputs.version }} - draft: false - prerelease: false - - name: Upload Linux Distro - id: upload-linux-distro - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: go/out/dolt-linux-amd64.tar.gz - asset_name: dolt-linux-amd64.tar.gz - asset_content_type: application/zip +# create-release: +# name: Create release +# runs-on: ubuntu-18.04 +# outputs: +# release_id: ${{ steps.create_release.outputs.id }} +# steps: +# - name: Checkout code +# uses: actions/checkout@v2 +# - name: Update dolt version command +# run: sed -i -e 's/ Version = ".*"/ Version = "'"$NEW_VERSION"'"/' "$FILE" +# env: +# FILE: ${{ format('{0}/go/cmd/dolt/dolt.go', github.workspace) }} +# NEW_VERSION: ${{ github.event.inputs.version }} +# - uses: EndBug/add-and-commit@v7 +# with: +# message: ${{ format('[ga-bump-release] Update Dolt version to {0} and release v{0}', github.event.inputs.version) }} +# add: ${{ format('{0}/go/cmd/dolt/dolt.go', github.workspace) }} +# cwd: "." +# - name: Build Binaries +# run: | +# GO_BUILD_VERSION=1.15.11 go/utils/publishrelease/buildbinaries.sh +# - name: Create Release +# id: create_release +# uses: actions/create-release@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# tag_name: v${{ github.event.inputs.version }} +# release_name: ${{ github.event.inputs.version }} +# draft: false +# prerelease: false +# - name: Upload Linux Distro +# id: upload-linux-distro +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} +# asset_path: go/out/dolt-linux-amd64.tar.gz +# asset_name: dolt-linux-amd64.tar.gz +# asset_content_type: application/zip + # - name: Upload OSX Distro # id: upload-osx-distro # uses: actions/upload-release-asset@v1 @@ -81,7 +82,7 @@ jobs: # asset_content_type: text/plain create-release-notes: - needs: create-release +# needs: create-release runs-on: ubuntu-18.04 steps: - name: Checkout Release Notes Generator @@ -90,38 +91,42 @@ jobs: repository: dolthub/release-notes-generator token: ${{ secrets.REPO_ACCESS_TOKEN }} - name: Install Dependencies - run: ./install-deps.sh + run: | + sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "DateTime::Format::ISO8601")' + sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "Getopt::Long")' + sudo perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "JSON::Parse")' env: PERL_MM_USE_DEFAULT: 1 - - name: Create Notes - run: | - ./gen_release_notes.pl \ - -d dolthub/go-mysql-server \ - -d dolthub/vitess dolthub/dolt v${{ github.event.inputs.version }} > changelog.txt - - name: Post Changelog to Release - uses: actions/github-script@v4 - with: - debug: true - github-token: ${{ secrets.REPO_ACCESS_TOKEN }} - script: | - const fs = require('fs'); - const path = require('path') - try { - const body = fs.readFileSync(path.join(process.env.WORKSPACE, "changelog.txt")) - const res = await github.repos.updateRelease({ - owner: "dolthub", - repo: "dolt", - release_id: parseInt(process.env.RELEASE_ID, 10), - body, - }); - console.log("Successfully updated release notes", res) - } catch (err) { - console.log("Error", err); - process.exit(1); - } - env: - WORKSPACE: ${{ github.workspace }} - RELEASE_ID: ${{ needs.create-release.outputs.release_id }} +# - name: Create Notes +# run: | +# ./gen_release_notes.pl \ +# -d dolthub/go-mysql-server \ +# -d dolthub/vitess dolthub/dolt v${{ github.event.inputs.version }} + +# - name: Post Changelog to Release +# uses: actions/github-script@v4 +# with: +# debug: true +# github-token: ${{ secrets.REPO_ACCESS_TOKEN }} +# script: | +# const fs = require('fs'); +# const path = require('path') +# try { +# const body = fs.readFileSync(path.join(process.env.WORKSPACE, "changelog.txt")) +# const res = await github.repos.updateRelease({ +# owner: "dolthub", +# repo: "dolt", +# release_id: parseInt(process.env.RELEASE_ID, 10), +# body, +# }); +# console.log("Successfully updated release notes", res) +# } catch (err) { +# console.log("Error", err); +# process.exit(1); +# } +# env: +# WORKSPACE: ${{ github.workspace }} +# RELEASE_ID: ${{ needs.create-release.outputs.release_id }} # homebrew-bump: # needs: create-release