Skip to content

v2.34.0

v2.34.0 #143

Workflow file for this run

name: versionRelease
on:
release:
types: [published]
jobs:
releaseFiles:
name: Release
strategy:
matrix:
kind: ['linux-x64', 'linux-arm64', 'linux-arm', 'win-x64']
include:
- kind: linux-x64
os: ubuntu-latest
target: linux-x64
- kind: linux-arm64
os: ubuntu-latest
target: linux-arm64
- kind: linux-arm
os: ubuntu-latest
target: linux/arm/v7
- kind: win-x64
os: ubuntu-latest
target: win-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0.x'
- name: Install minver CLI
run: dotnet tool install --tool-path ./minver minver-cli --version 4.3.0
- name: Calculate version using minver CLI
id: version
run: |
echo "version=$(./minver/minver --default-pre-release-identifiers releaseCandidate --tag-prefix v)" >> "$GITHUB_ENV"
- name: Run unit tests
run: dotnet test TeslaSolarCharger.Tests
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build TeslaSolarCharger
shell: bash
run: |
# Define some variables for things we need
tag=$(git describe --tags --abbrev=0)
release_name="TeslaSolarCharger-$tag-${{ matrix.kind }}"
# Build everything
dotnet publish TeslaSolarCharger/Server/TeslaSolarCharger.Server.csproj --runtime "${{ matrix.kind }}" -c Release -o "$release_name"
# Pack files
tar czvf "${release_name}.tar.gz" "$release_name"
# Delete output directory
rm -r "$release_name"
- name: Build Plugins.SmaEnergymeter
shell: bash
run: |
# Define some variables for things we need
tag=$(git describe --tags --abbrev=0)
release_name="Plugins.SmaEnergymeter-$tag-${{ matrix.kind }}"
# Build everything
dotnet publish Plugins.SmaEnergymeter/Plugins.SmaEnergymeter.csproj --runtime "${{ matrix.kind }}" -c Release -o "$release_name" --self-contained
# Pack files
tar czvf "${release_name}.tar.gz" "$release_name"
# Delete output directory
rm -r "$release_name"
- name: Build Plugins.SolarEdge
shell: bash
run: |
# Define some variables for things we need
tag=$(git describe --tags --abbrev=0)
release_name="Plugins.SolarEdge-$tag-${{ matrix.kind }}"
# Build everything
dotnet publish Plugins.SolarEdge/Plugins.SolarEdge.csproj --runtime "${{ matrix.kind }}" -c Release -o "$release_name"
# Pack files
tar czvf "${release_name}.tar.gz" "$release_name"
# Delete output directory
rm -r "$release_name"
- name: Build Plugins.Modbus
shell: bash
run: |
# Define some variables for things we need
tag=$(git describe --tags --abbrev=0)
release_name="Plugins.Modbus-$tag-${{ matrix.kind }}"
# Build everything
dotnet publish Plugins.Modbus/Plugins.Modbus.csproj --runtime "${{ matrix.kind }}" -c Release -o "$release_name"
# Pack files
tar czvf "${release_name}.tar.gz" "$release_name"
# Delete output directory
rm -r "$release_name"
- name: Build Plugins.Solax
shell: bash
run: |
# Define some variables for things we need
tag=$(git describe --tags --abbrev=0)
release_name="Plugins.Solax-$tag-${{ matrix.kind }}"
# Build everything
dotnet publish Plugins.Solax/Plugins.Solax.csproj --runtime "${{ matrix.kind }}" -c Release -o "$release_name"
# Pack files
tar czvf "${release_name}.tar.gz" "$release_name"
# Delete output directory
rm -r "$release_name"
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: "*.tar.gz"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
releaseDockerLatestTeslaSolarCharger:
name: Building TeslaSolarCharger image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pkuehnel/teslasolarcharger
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Install minver CLI
run: dotnet tool install --tool-path ./minver minver-cli --version 4.3.0
- name: Calculate version using minver CLI
id: version
run: |
echo "version=$(./minver/minver --default-pre-release-identifiers releaseCandidate --tag-prefix v)" >> "$GITHUB_ENV"
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS}}
- name: Build and push TeslaSolarCharger
uses: docker/build-push-action@v4
with:
build-args: MINVERVERSIONOVERRIDE=${{ env.version }}
file: ./TeslaSolarCharger/Server/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
releaseDockerLatestSmartTeslaAmpSetter:
name: Building SmartTeslaAmpSetter image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pkuehnel/smartteslaampsetter
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Install minver CLI
run: dotnet tool install --tool-path ./minver minver-cli --version 4.3.0
- name: Calculate version using minver CLI
id: version
run: |
echo "version=$(./minver/minver --default-pre-release-identifiers releaseCandidate --tag-prefix v)" >> "$GITHUB_ENV"
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS}}
- name: Build and push SmartTeslaAmpSetter
uses: docker/build-push-action@v4
with:
build-args: MINVERVERSIONOVERRIDE=${{ env.version }}
file: ./TeslaSolarCharger/Server/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
releaseDockerLatestSmaEnergymeterpluginTeslaSolarCharger:
name: Building SMAPlugin Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pkuehnel/teslasolarchargersmaplugin
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS}}
- name: Build and push SmaPlugin
uses: docker/build-push-action@v4
with:
file: ./Plugins.SmaEnergymeter/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
releaseDockerLatestSmaEnergymeterpluginSmartTeslaAmpSetter:
name: Building SMAPlugin Image old name
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pkuehnel/smartteslaampsettersmaplugin
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS}}
- name: Build and push SmaPlugin
uses: docker/build-push-action@v4
with:
file: ./Plugins.SmaEnergymeter/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
releaseDockerLatestSolarEdgepluginTeslaSolarCharger:
name: Building SolarEdgePlugin Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pkuehnel/teslasolarchargersolaredgeplugin
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS}}
- name: Build and push SolarEdgePlugin
uses: docker/build-push-action@v4
with:
file: ./Plugins.SolarEdge/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
releaseDockerLatestSolarEdgepluginSmartTeslaAmpSetter:
name: Building SolarEdgePlugin Image old name
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pkuehnel/smartteslaampsettersolaredgeplugin
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS}}
- name: Build and push SolarEdgePlugin
uses: docker/build-push-action@v4
with:
file: ./Plugins.SolarEdge/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
releaseDockerLatestModbusPlugin:
name: Building Modbus Plugin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pkuehnel/teslasolarchargermodbusplugin
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS}}
- name: Build and push ModbusPlugin
uses: docker/build-push-action@v4
with:
file: ./Plugins.Modbus/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
releaseDockerLatestSolaxPlugin:
name: Building Solax Plugin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pkuehnel/teslasolarchargersolaxplugin
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: DockerHub login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS}}
- name: Build and push SolaxPlugin
uses: docker/build-push-action@v4
with:
file: ./Plugins.Solax/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}