Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 3 to 4. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v3...v4) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
127 lines
3.1 KiB
YAML
127 lines
3.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
jobs:
|
|
call-build-workflow:
|
|
if: "startsWith(github.ref, 'refs/tags')"
|
|
uses: evcc-io/evcc/.github/workflows/default.yml@master
|
|
|
|
docker:
|
|
name: Publish Docker :release
|
|
needs:
|
|
- call-build-workflow
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Login
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
password: ${{ secrets.DOCKER_PASS }}
|
|
|
|
- name: Setup Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Meta
|
|
id: meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: |
|
|
andig/evcc
|
|
evcc/evcc
|
|
|
|
- name: Publish
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v6
|
|
push: true
|
|
build-args: RELEASE=1
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
apt:
|
|
name: Github & APT
|
|
needs:
|
|
- call-build-workflow
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ^1.18
|
|
cache: true
|
|
id: go
|
|
|
|
- name: Install Cloudsmith CLI
|
|
run: pip install --upgrade cloudsmith-cli
|
|
|
|
- name: Patch ASN1
|
|
run: make patch-asn1-sudo
|
|
|
|
# gokrazy image
|
|
# - name: Prepare Image
|
|
# run: |
|
|
# make prepare-image
|
|
# sed -i -e 's#-ld.*$#& -X github.com/evcc-io/evcc/server/updater.Password=${{ secrets.IMAGE_PASS }}#' buildflags/github.com/evcc-io/evcc/buildflags.txt
|
|
# mkdir /home/runner/.config/gokrazy
|
|
# echo ${{ secrets.IMAGE_PASS }}> /home/runner/.config/gokrazy/http-password.txt
|
|
|
|
# - name: Build Image
|
|
# run: make image
|
|
|
|
# - name: Build Root Filesystem
|
|
# run: make image-rootfs
|
|
|
|
- name: Create Github Release
|
|
uses: goreleaser/goreleaser-action@v4
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
# use GH_TOKEN for access to evcc-io/homebrew-tap
|
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Publish .deb to Cloudsmith
|
|
env:
|
|
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
|
|
run: make apt-release
|
|
|
|
hassio:
|
|
name: Hassio Addon
|
|
needs:
|
|
- docker
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@master
|
|
with:
|
|
repository: evcc-io/hassio-addon
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
path: ./hassio
|
|
|
|
- name: Update version
|
|
run: |
|
|
sed -i -e s#\"version.*#\"version\":\ \"$(echo ${{ github.ref }} | sed -e s#refs/tags/##)\",# ./hassio/evcc/config.json
|
|
|
|
- name: Push
|
|
run: |
|
|
cd ./hassio
|
|
git add .
|
|
git config user.name github-actions
|
|
git config user.email github-actions@github.com
|
|
git commit -am "Mirror evcc release"
|
|
git push
|