diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 774913c5f..2362d5166 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -37,7 +37,7 @@ jobs: - name: Deploy to docs repo uses: peaceiris/actions-gh-pages@v3 with: - personal_token: ${{ secrets.GH_REPO }} + personal_token: ${{ secrets.GH_TOKEN }} publish_dir: ./templates/docs external_repository: evcc-io/docs publish_branch: main diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 984db9bb3..2e3d0f998 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -85,18 +85,18 @@ jobs: go-version: ^1.18 id: go - - name: Set up Node - uses: actions/setup-node@v2 - with: - node-version: "16" + # - name: Set up Node + # uses: actions/setup-node@v2 + # with: + # node-version: "16" - name: Install Cloudsmith CLI run: pip install --upgrade cloudsmith-cli - - name: Clean git - run: | - git checkout go.* - rm -rf flags buildflags + # - name: Clean git + # run: | + # git checkout go.* + # rm -rf flags buildflags - name: Create nightly build uses: goreleaser/goreleaser-action@v2 @@ -109,8 +109,4 @@ jobs: - name: Publish .deb to Cloudsmith env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} - run: | - for filename in release/*.deb; do - echo "Pushing $filename to 'unstable'" - cloudsmith push deb evcc/unstable/any-distro/any-version $filename - done + run: make apt-nightly diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc0c2832d..0efcf395f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,10 +65,10 @@ jobs: go-version: ^1.18 id: go - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: "16" + # - name: Setup Node + # uses: actions/setup-node@v2 + # with: + # node-version: "16" - name: Install Cloudsmith CLI run: pip install --upgrade cloudsmith-cli @@ -87,10 +87,10 @@ jobs: # - name: Build Root Filesystem # run: make image-rootfs - - name: Clean git - run: | - git checkout go.* - rm -rf flags buildflags + # - name: Clean git + # run: | + # git checkout go.* + # rm -rf flags buildflags - name: Create Github Release uses: goreleaser/goreleaser-action@v2 @@ -98,13 +98,9 @@ jobs: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GH_REPO }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish .deb to Cloudsmith env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} - run: | - for filename in release/*.deb; do - echo "Pushing $filename to 'stable'" - cloudsmith push deb evcc/stable/any-distro/any-version $filename - done + run: make apt-release diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 282a60a87..0970f6e47 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -37,7 +37,7 @@ jobs: - name: Deploy to evcc.io repo uses: peaceiris/actions-gh-pages@v3 with: - personal_token: ${{ secrets.GH_REPO }} + personal_token: ${{ secrets.GH_TOKEN }} publish_dir: ./templates/evcc.io/ external_repository: evcc-io/evcc.io publish_branch: main diff --git a/Makefile b/Makefile index 6f4b3b896..4e04779e7 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,9 @@ IMAGE_FILE := evcc_$(TAG_NAME).image IMAGE_ROOTFS := evcc_$(TAG_NAME).rootfs IMAGE_OPTIONS := -hostname evcc -http_port 8080 github.com/gokrazy/serial-busybox github.com/gokrazy/breakglass github.com/evcc-io/evcc +# deb +PACKAGES = ./release + default: build all: clean install install-ui ui assets lint test-ui lint-ui test build @@ -96,6 +99,16 @@ publish-release: RELEASE=1 seihon publish --dry-run=false --template docker/ci.Dockerfile --base-runtime-image alpine:$(ALPINE_VERSION) \ --image-name $(DOCKER_IMAGE) -v "latest" -v "$(TAG_NAME)" --targets=$(TARGETS) +apt-nightly: + $(foreach file, $(wildcard $(PACKAGES)/*.deb), \ + cloudsmith push deb evcc/unstable/any-distro/any-version $(file); \ + ) + +apt-release: + $(foreach file, $(wildcard $(PACKAGES)/*.deb), \ + cloudsmith push deb evcc/stable/any-distro/any-version $(file); \ + ) + # gokrazy image prepare-image: go install github.com/gokrazy/tools/cmd/gokr-packer@latest