name: Release on: push: tags: ["*.*.*"] # Reruns steps of the release for package.json's version, from the branch it's run on workflow_dispatch: inputs: steps: description: Steps to run, such as "fdroid" (all when empty) required: false default: "" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: REGISTRY: gitea.coracle.social IMAGE_NAME: coracle/flotilla jobs: image: runs-on: ubuntu-latest if: github.event_name == 'push' permissions: contents: read packages: write steps: - name: Checkout repository uses: actions/checkout@v4 - name: Log in to the Container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: hodlbod password: ${{ secrets.PACKAGE_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=semver,pattern={{version}} type=raw,value=latest - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: driver: docker-container - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . push: true target: production platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} # The signed builds come from pnpm release:local, so nothing here holds a signing key release: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Node uses: actions/setup-node@v4 with: node-version-file: .nvmrc - name: Install dependencies run: | corepack enable pnpm i --frozen-lockfile npm ci --prefix electron - name: Release env: GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITEA_PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} STEPS: ${{ github.event.inputs.steps }} run: pnpm release:ci --yes $STEPS