Skip to content

Commit

Permalink
Merge pull request #109 from Chia-Network/develop
Browse files Browse the repository at this point in the history
Release 1.0.29
  • Loading branch information
TheLastCicada authored Oct 5, 2023
2 parents 2f98220 + 1efebbc commit f9591a9
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 9 deletions.
55 changes: 48 additions & 7 deletions .github/workflows/build-installers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:

jobs:
build:
name: Build - ${{ matrix.config.name }} ${{ matrix.os.emoji }} ${{ matrix.os.name }} ${{ matrix.arch.name }}
name: 👷 ${{ matrix.config.name }} ${{ matrix.os.emoji }} ${{ matrix.preconfiguration.name }} ${{ matrix.os.name }} ${{ matrix.arch.name }}
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -81,11 +81,28 @@ jobs:
artifact-name: x64
deb-platform: amd64
electron-builder-options: --x64
preconfiguration:
- name: default
cadt-api-server-host: 'https://observer.climateactiondata.org/api'
- name: testneta
cadt-api-server-host: 'https://chia-cadt-demo.chiamanaged.com/observer'
exclude:
- os:
matrix: windows
arch:
matrix: arm
- config:
app-mode: registry
preconfiguration:
name: testneta
- config:
app-mode: explorer
preconfiguration:
name: testneta
- config:
app-mode: dev
preconfiguration:
name: testneta

steps:
- name: Checkout Code
Expand All @@ -104,6 +121,13 @@ jobs:
echo 'CHIA_ROOT="~/.chia/mainnet"' >> .env
echo 'CONFIG_PATH="climate_token/config/config.yaml"' >> .env
- name: Apply preconfigurations
if: matrix.preconfiguration.name != 'default'
run: |
perl -pi -e 's{CADT_API_SERVER_HOST:\ str\ =.*}{CADT_API_SERVER_HOST:\ str\ =\ \"${{ matrix.preconfiguration.cadt-api-server-host }}\"}g' app/config.py
perl -pi -e 's{CADT_API_SERVER_HOST:.*}{CADT_API_SERVER_HOST:\ \"${{ matrix.preconfiguration.cadt-api-server-host }}\"}g' config.yaml
cat config.yaml
- name: Create virtual environment
uses: Chia-Network/actions/create-venv@main
id: create-venv
Expand Down Expand Up @@ -184,41 +208,58 @@ jobs:
name: ${{ matrix.config.app-name }}_${{ steps.tag-name.outputs.TAGNAME || github.sha }}-1_${{ matrix.arch.deb-platform }}.deb
path: ${{ github.workspace }}/deb/*.deb
if-no-files-found: error
if: matrix.os.matrix == 'linux'
if: matrix.os.matrix == 'linux' && matrix.preconfiguration.name == 'default'

- name: Upload preconfigured deb
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.app-name }}-${{ matrix.preconfiguration.name }}_${{ steps.tag-name.outputs.TAGNAME || github.sha }}-1_${{ matrix.arch.deb-platform }}.deb
path: ${{ github.workspace }}/deb/*.deb
if-no-files-found: error
if: matrix.os.matrix == 'linux' && matrix.preconfiguration.name != 'default'

- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.app-name }}-${{ matrix.os.artifact-os-name }}-${{ matrix.arch.artifact-name }}
path: ${{ github.workspace }}/artifacts/*
if-no-files-found: error
if: matrix.preconfiguration.name == 'default'

- name: Upload preconfigured binary
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.app-name }}-${{ matrix.preconfiguration.name }}-${{ matrix.os.artifact-os-name }}-${{ matrix.arch.artifact-name }}
path: ${{ github.workspace }}/artifacts/*
if-no-files-found: error
if: matrix.preconfiguration.name != 'default'

- name: Create zip files for release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: ${{ matrix.config.app-name }}_${{ matrix.os.artifact-os-name }}_${{ steps.tag-name.outputs.TAGNAME || github.sha }}_${{ matrix.arch.artifact-name }}.zip
directory: 'artifacts'
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/') && matrix.preconfiguration.name == 'default'

- name: Release executable
uses: softprops/[email protected]
with:
files: ./artifacts/${{ matrix.config.app-name }}_${{ matrix.os.artifact-os-name }}_${{ steps.tag-name.outputs.TAGNAME || github.sha }}_${{ matrix.arch.artifact-name }}.zip
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/') && matrix.preconfiguration.name == 'default'

- name: Release debs
uses: softprops/[email protected]
with:
files: |
${{ github.workspace }}/deb/${{ matrix.config.app-name }}_${{ steps.tag-name.outputs.TAGNAME || github.sha }}-1_${{ matrix.arch.deb-platform }}.deb
if: startsWith(github.ref, 'refs/tags/') && matrix.os.matrix == 'linux'
if: startsWith(github.ref, 'refs/tags/') && matrix.os.matrix == 'linux' && matrix.preconfiguration.name == 'default'

# Only do for Intel builds as we know we build ARM and can pass that info along to the apt update automation
- name: Create artifact with metadata for apt upload
run: |
echo "${{ matrix.config.app-name }}" > APTDATA_${{ matrix.config.app-name }}.dat
if: startsWith(github.ref, 'refs/tags/') && matrix.os.matrix == 'linux' && matrix.config.add-to-apt == 'true' && matrix.arch.name == 'Intel'
if: startsWith(github.ref, 'refs/tags/') && matrix.os.matrix == 'linux' && matrix.config.add-to-apt == 'true' && matrix.arch.name == 'Intel' && matrix.preconfiguration.name == 'default'

- name: Upload artifact to pass apt data to release job
uses: actions/upload-artifact@v3
Expand All @@ -227,7 +268,7 @@ jobs:
path: APTDATA_${{ matrix.config.app-name }}.dat
if-no-files-found: error
retention-days: 1
if: startsWith(github.ref, 'refs/tags/') && matrix.os.matrix == 'linux' && matrix.config.add-to-apt == 'true' && matrix.arch.name == 'Intel'
if: startsWith(github.ref, 'refs/tags/') && matrix.os.matrix == 'linux' && matrix.config.add-to-apt == 'true' && matrix.arch.name == 'Intel' && matrix.preconfiguration.name == 'default'


apt-upload:
Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CLIMATE_EXPLORER_SERVER_HOST: 0.0.0.0
BLOCK_START: 1500000
BLOCK_RANGE: 10000
MIN_DEPTH: 4
CADT_API_SERVER_HOST: https://api.climatewarehouse.chia.net
CADT_API_SERVER_HOST: https://observer.climateactiondata.org/api
CADT_API_KEY:
CHIA_HOSTNAME: localhost
CHIA_FULL_NODE_RPC_PORT: 8555
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "Chia Climate Token Driver"
version = "1.0.28"
version = "1.0.29"
description = "https://github.com/Chia-Network/climate-token-driver"
authors = ["Harry Hsu <[email protected]>",
"Chia Network Inc <[email protected]>"]
Expand Down

0 comments on commit f9591a9

Please sign in to comment.