1.6.40 #132
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- run: yarn install | |
- run: yarn build | |
- if: "github.event.release.prerelease" | |
run: yarn publish --tag beta | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
- if: "github.event.release.prerelease" | |
run: cd src/server/function/twikoo && yarn publish --tag beta | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
- if: "github.event.release.prerelease" | |
run: cd src/server/vercel && yarn publish --tag beta | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
- if: "github.event.release.prerelease" | |
run: cd src/server/self-hosted && yarn publish --tag beta | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
- if: "github.event.release.prerelease" | |
run: cd src/server/netlify && yarn publish --tag beta | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
- if: "!github.event.release.prerelease" | |
run: yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
- if: "!github.event.release.prerelease" | |
run: cd src/server/function/twikoo && yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
- if: "!github.event.release.prerelease" | |
run: cd src/server/vercel && yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
- if: "!github.event.release.prerelease" | |
run: cd src/server/self-hosted && yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
- if: "!github.event.release.prerelease" | |
run: cd src/server/netlify && yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
publish-docker: | |
needs: publish-npm | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: Get twikoo:latest version | |
run: echo "TWIKOO_LATEST_VERSION=$(npm view twikoo@latest version)" >> "$GITHUB_ENV" | |
- | |
name: Build and push amd64 image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
imaegoo/twikoo:latest | |
imaegoo/twikoo:${{ env.TWIKOO_LATEST_VERSION }} | |
- | |
name: Build and push arm32v7 image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: linux/arm/v7 | |
push: true | |
tags: | | |
imaegoo/twikoo:arm32v7 | |
imaegoo/twikoo:${{ env.TWIKOO_LATEST_VERSION }}-arm32v7 | |
build-args: NODE_IMAGE=arm32v7/node |