Skip to content

Commit

Permalink
Revert manual release changes
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-j-h committed May 7, 2024
1 parent 063d714 commit 1a54c76
Showing 1 changed file with 46 additions and 52 deletions.
98 changes: 46 additions & 52 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,16 @@ jobs:
- name: 'Build ARM image to Docker Hub'
id: build
run: |
echo "skipping..."
# output_dir=${{ runner.temp }}/docker
# mkdir -p $output_dir
# docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_ACCESS_TOKEN }}
# docker buildx build --push --platform linux/amd64,linux/arm64 -t ${{ secrets.DOCKER_REPO }}:latest -t ${{ secrets.DOCKER_REPO }}:${{ steps.extract.outputs.image_tag }} -t ${{ secrets.DOCKER_REPO }}:${{ steps.extract.outputs.image_tag_minor_latest }} .
output_dir=${{ runner.temp }}/docker
mkdir -p $output_dir
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_ACCESS_TOKEN }}
docker buildx build --push --platform linux/amd64,linux/arm64 -t ${{ secrets.DOCKER_REPO }}:latest -t ${{ secrets.DOCKER_REPO }}:${{ steps.extract.outputs.image_tag }} -t ${{ secrets.DOCKER_REPO }}:${{ steps.extract.outputs.image_tag_minor_latest }} .
build-binary:
name: 'Build binary for ${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
# os: [ "ubuntu-20.04", "macos-latest" ]
os: [ "macos-latest" ]
os: [ "ubuntu-20.04", "macos-latest" ]
runs-on: ${{ matrix.os }}
steps:
- name: 'Setup Go ${{ env.GO_VERSION }}'
Expand All @@ -55,8 +53,7 @@ jobs:
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
echo "::set-output name=key::$(go env GOOS)_$(go env GOARCH)"
echo "::set-output name=version::v24.4.0"
# echo "::set-output name=version::${GITHUB_REF##*/}"
echo "::set-output name=version::${GITHUB_REF##*/}"
- name: 'Check out project files'
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -106,16 +103,14 @@ jobs:
strategy:
fail-fast: false
matrix:
# goarch: [ "linux_amd64", "darwin_arm64" ]
goarch: [ "darwin_arm64" ]
goarch: [ "linux_amd64", "darwin_arm64" ]
runs-on: ubuntu-latest
steps:
- name: 'Prepare environment'
id: env
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
echo "::set-output name=version::v24.4.0"
# echo "::set-output name=version::${GITHUB_REF##*/}"
echo "::set-output name=version::${GITHUB_REF##*/}"
- name: 'Download artifacts'
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -147,45 +142,44 @@ jobs:
- name: 'Generate release notes'
id: release_notes
run: |
echo "skipping..."
# git fetch --depth=1 origin +refs/tags/*:refs/tags/*
# file="generated-release-notes.md"
# current_version="${GITHUB_REF##*/}"
# last_version=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
# last_release_date=$(git log -1 --format=%cd --date=short $last_version)
# echo "Last version: $last_version on $last_release_date"
# # pulling from git logs
# curl -q -s -H "Accept: application/vnd.github.v3+json" \
# "https://api.github.com/search/issues?q=repo:ConsenSys/quorum+is:pr+is:merged+merged%3A>=$last_release_date+sort%3Aupdated-desc" | jq -r '"* " + (.items[]|.title + " #" + (.number|tostring))' \
# >> $file
# # pulling file hashes from Cloudsmith
# echo "" >> $file
# echo "| Filename | SHA256 Hash |" >> $file
# echo "|:---------|:------------|" >> $file
# curl --request GET \
# --url "https://api.cloudsmith.io/v1/packages/consensys/go-quorum/?query=version:$current_version" \
# --header 'Accept: application/json' \
# --header 'X-Api-Key: ${{ secrets.CLOUDSMITH_API_KEY }}' \
# | jq '.[] | select(.name | endswith(".asc") | not) | "|[\(.name)](\(.cdn_url))|`\(.checksum_sha256)`|"' -r \
# >> $file
# content=$(cat $file)
# # escape newline
# content="${content//'%'/'%25'}"
# content="${content//$'\n'/'%0A'}"
# content="${content//$'\r'/'%0D'}"
# echo "::set-output name=content::$content"
# - name: 'Create Github draft release'
# uses: actions/create-release@v1
# env:
# # This token is provided by Actions, you do not need to create your own token
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ github.ref }}
# body: |
# ${{ steps.release_notes.outputs.content }}
# draft: true
# prerelease: false
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
file="generated-release-notes.md"
current_version="${GITHUB_REF##*/}"
last_version=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
last_release_date=$(git log -1 --format=%cd --date=short $last_version)
echo "Last version: $last_version on $last_release_date"
# pulling from git logs
curl -q -s -H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/search/issues?q=repo:ConsenSys/quorum+is:pr+is:merged+merged%3A>=$last_release_date+sort%3Aupdated-desc" | jq -r '"* " + (.items[]|.title + " #" + (.number|tostring))' \
>> $file
# pulling file hashes from Cloudsmith
echo "" >> $file
echo "| Filename | SHA256 Hash |" >> $file
echo "|:---------|:------------|" >> $file
curl --request GET \
--url "https://api.cloudsmith.io/v1/packages/consensys/go-quorum/?query=version:$current_version" \
--header 'Accept: application/json' \
--header 'X-Api-Key: ${{ secrets.CLOUDSMITH_API_KEY }}' \
| jq '.[] | select(.name | endswith(".asc") | not) | "|[\(.name)](\(.cdn_url))|`\(.checksum_sha256)`|"' -r \
>> $file
content=$(cat $file)
# escape newline
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=content::$content"
- name: 'Create Github draft release'
uses: actions/create-release@v1
env:
# This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
${{ steps.release_notes.outputs.content }}
draft: true
prerelease: false
notify:
if: always()
name: 'Notify'
Expand Down

0 comments on commit 1a54c76

Please sign in to comment.