diff options
Diffstat (limited to '')
-rw-r--r-- | .github/FUNDING.yml | 1 | ||||
-rw-r--r-- | .github/dependabot.yml | 3 | ||||
-rw-r--r-- | .github/workflows/backend.yml | 36 | ||||
-rw-r--r-- | .github/workflows/docker.yml | 24 | ||||
-rw-r--r-- | .github/workflows/frontend.yml | 4 | ||||
-rw-r--r-- | .github/workflows/release.yml | 79 |
6 files changed, 44 insertions, 103 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..9059f66 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: tsl0922 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index cbbda6f..e3d94b0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,3 @@ updates: schedule: interval: daily open-pull-requests-limit: 10 - ignore: - - dependency-name: gts - - dependency-name: webpack-dev-server diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 9dff623..cfab7bd 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -18,6 +18,7 @@ jobs: build: runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: lws-version: [4.3.2, 3.2.3] steps: @@ -34,7 +35,7 @@ jobs: cd libwebsockets-${LWS_VERSION} cmake -DLWS_WITH_LIBUV=ON -DLWS_UNIX_SOCK=ON -DLWS_IPV6=ON -DLWS_WITHOUT_TESTAPPS=ON -DCMAKE_BUILD_TYPE=RELEASE . make && sudo make install && sudo ldconfig - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build ttyd run: | cmake -DCMAKE_BUILD_TYPE=RELEASE . @@ -43,10 +44,11 @@ jobs: cross: runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: - target: [i686, x86_64, arm, armhf, aarch64, mips, mipsel, mips64, mips64el, s390x] + target: [i686, x86_64, arm, armhf, aarch64, mips, mipsel, mips64, mips64el, s390x, win32] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install packages run: | sudo apt-get update @@ -55,31 +57,7 @@ jobs: env: BUILD_TARGET: ${{ matrix.target }} run: ./scripts/cross-build.sh - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ttyd.${{ matrix.target }} - path: build/ttyd - win10: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - install: >- - base-devel - subversion - mingw64/mingw-w64-x86_64-gcc - mingw64/mingw-w64-x86_64-cmake - mingw64/mingw-w64-x86_64-zlib - mingw64/mingw-w64-x86_64-libuv - mingw64/mingw-w64-x86_64-mbedtls - mingw64/mingw-w64-x86_64-json-c - update: true - - name: Build ttyd - shell: msys2 {0} - run: ./scripts/mingw-build.sh - - uses: actions/upload-artifact@v2 - with: - name: ttyd.win10 - path: build/ttyd.exe + path: build/ttyd* diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index de6ce65..4dbaf24 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install packages run: | sudo apt-get update @@ -22,9 +22,9 @@ jobs: [ "$arch" = "armv7" ] && arch="arm" mkdir -p dist/$arch && cp build/ttyd dist/$arch/ttyd done - - uses: docker/setup-qemu-action@v1 - - uses: docker/setup-buildx-action@v1 - - uses: docker/login-action@v1 + - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-buildx-action@v2 + - uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} @@ -34,26 +34,26 @@ jobs: case $GITHUB_REF in refs/tags/*) TAG_NAME=${GITHUB_REF#refs/tags/} - echo ::set-output name=DOCKER_TAG::tsl0922/ttyd:${TAG_NAME} - echo ::set-output name=ALPINE_TAG::tsl0922/ttyd:${TAG_NAME}-alpine + echo "DOCKER_TAG=tsl0922/ttyd:${TAG_NAME}" >> $GITHUB_ENV + echo "ALPINE_TAG=tsl0922/ttyd:${TAG_NAME}-alpine" >> $GITHUB_ENV ;; *) - echo ::set-output name=DOCKER_TAG::tsl0922/ttyd:latest - echo ::set-output name=ALPINE_TAG::tsl0922/ttyd:alpine + echo "DOCKER_TAG=tsl0922/ttyd:latest" >> $GITHUB_ENV + echo "ALPINE_TAG=tsl0922/ttyd:alpine" >> $GITHUB_ENV esac - name: build/push docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: ./Dockerfile platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/s390x push: true - tags: ${{ steps.docker_tag.outputs.DOCKER_TAG }} + tags: ${{ env.DOCKER_TAG }} - name: build/push docker image (alpine) - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: ./Dockerfile.alpine platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/s390x push: true - tags: ${{ steps.docker_tag.outputs.ALPINE_TAG }} + tags: ${{ env.ALPINE_TAG }} diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 272a24b..f0005f1 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -14,8 +14,8 @@ jobs: build: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: '16.x' - name: Run yarn install, check and build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0ea6bf..9500cee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,30 +6,14 @@ on: - "*" jobs: - release: - runs-on: ubuntu-20.04 - outputs: - upload_url: ${{ steps.create_release.outputs.upload_url }} - steps: - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: true - prerelease: false - build: runs-on: ubuntu-20.04 - needs: release strategy: + fail-fast: false matrix: - target: [i686, x86_64, arm, armhf, aarch64, mips, mipsel, mips64, mips64el, s390x] + target: [i686, x86_64, arm, armhf, aarch64, mips, mipsel, mips64, mips64el, s390x, win32] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install packages run: | sudo apt-get update @@ -38,44 +22,25 @@ jobs: env: BUILD_TARGET: ${{ matrix.target }} run: ./scripts/cross-build.sh - - name: Upload assets - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/upload-artifact@v3 with: - upload_url: ${{ needs.release.outputs.upload_url }} - asset_path: build/ttyd - asset_name: ttyd.${{ matrix.target }} - asset_content_type: application/octet-stream - win10: - runs-on: windows-latest - needs: release + name: ttyd.${{ matrix.target }} + path: build/ttyd* + publish: + needs: [build] + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - uses: msys2/setup-msys2@v2 + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + - run: | + mkdir build + for file in ttyd.*/*; do + target=$(echo $file | awk -F/ '{print $1}') + [[ $file == *.exe ]] && target="$target.exe" + mv $file build/$target + done + - uses: ncipollo/release-action@v1 with: - msystem: MINGW64 - install: >- - base-devel - subversion - mingw64/mingw-w64-x86_64-gcc - mingw64/mingw-w64-x86_64-cmake - mingw64/mingw-w64-x86_64-zlib - mingw64/mingw-w64-x86_64-libuv - mingw64/mingw-w64-x86_64-mbedtls - mingw64/mingw-w64-x86_64-json-c - update: true - - name: Build ttyd - shell: msys2 {0} - run: ./scripts/mingw-build.sh - - name: Upload assets - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.release.outputs.upload_url }} - asset_path: build/ttyd.exe - asset_name: ttyd.win10.exe - asset_content_type: application/octet-stream + artifacts: build/* + allowUpdates: true + draft: true |