Skip to content

ci: fix ui build workflow #100

ci: fix ui build workflow

ci: fix ui build workflow #100

Workflow file for this run

name: release
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: "1.23"
- uses: taiki-e/install-action@just
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
install-only: true
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Publish Release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: just release
- name: Publish to Linux Repository
if: startsWith(github.ref, 'refs/tags/') && env.PUBLISH_TOKEN
env:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
PUBLISH_REPO: ${{ secrets.PUBLISH_REPO }}
PUBLISH_OWNER: ${{ secrets.PUBLISH_OWNER }}
run: |
./ci/publish.sh ./dist --repo "$PUBLISH_REPO" --owner "$PUBLISH_OWNER"
ui:
needs: [goreleaser]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install node.js dependencies
run: |
cd ./ui
npm install npm -g
npm ci
- name: Build and zip UI-Plugin
run : |
cd ./ui
UI_VERSION=$(jq -r .version package.json)
npm run build
mv dist/tedge-container-plugin-ui.zip "dist/tedge-container-plugin-ui_${UI_VERSION}.zip"
- name: Upload
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.ref_name }}" ui/dist/tedge-container-plugin-ui_*.zip