Skip to content

Commit

Permalink
Added release job
Browse files Browse the repository at this point in the history
  • Loading branch information
ironbeer committed Aug 9, 2023
1 parent d7a15ba commit 9467497
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,91 @@ jobs:
with:
name: ${{ github.ref_name }}
path: geth-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.zip

release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: ${{ github.ref_name }}
path: artifacts

- name: Archive genesis.json
run: zip -r genesis.zip genesis

- name: Create setup.sh
run: |
sed -e 's#__REPOSITORY__#${{ github.repository }}#' .github/setup_template.sh | \
sed -e 's#__RELEASE__#${{ github.ref_name }}#' > setup.sh
- name: Create sha256sums.txt
run: |
sha256sum genesis.zip > sha256sums.txt
sha256sum setup.sh >> sha256sums.txt
(cd artifacts && sha256sum *) >> sha256sums.txt
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: true

- name: Upload Asset - Linux amd64
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/geth-${{ github.ref_name }}-linux-amd64.zip
asset_name: geth-${{ github.ref_name }}-linux-amd64.zip
asset_content_type: application/zip

- name: Upload Asset - Linux arm64
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/geth-${{ github.ref_name }}-linux-arm64.zip
asset_name: geth-${{ github.ref_name }}-linux-arm64.zip
asset_content_type: application/zip

- name: Upload Asset - genesis.zip
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: genesis.zip
asset_name: genesis.zip
asset_content_type: application/zip

- name: Upload Asset - setup.sh
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: setup.sh
asset_name: setup.sh
asset_content_type: text/plain

- name: Upload Asset - sha256sums.txt
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: sha256sums.txt
asset_name: sha256sums.txt
asset_content_type: text/plain

0 comments on commit 9467497

Please sign in to comment.