From e9faf8fe3bce2b5e8bbc5056085d94fbc9fc39df Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Wed, 15 May 2024 15:44:38 +0800 Subject: [PATCH] remove yml --- .github/workflows/auto_aur_release_stable.yml | 84 ------------------- .github/workflows/dockerimage.yml | 80 ------------------ .github/workflows/target-branch.yml | 20 ----- 3 files changed, 184 deletions(-) delete mode 100644 .github/workflows/auto_aur_release_stable.yml delete mode 100644 .github/workflows/dockerimage.yml delete mode 100644 .github/workflows/target-branch.yml diff --git a/.github/workflows/auto_aur_release_stable.yml b/.github/workflows/auto_aur_release_stable.yml deleted file mode 100644 index 09cd65f3cc1..00000000000 --- a/.github/workflows/auto_aur_release_stable.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Upload to AUR - -on: - release: - types: [published] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - - name: Check tag aka check release type - id: checktag - run: | - if [[ "${{ github.ref }}" == *"dev"* ]]; then - echo "Skip the workflow as the tag contains 'dev'" - echo "::set-output name=skip::true" - else - echo "Continue the workflow" - echo "::set-output name=skip::false" - fi - shell: bash - - - name: Extract tag name - id: get_version - run: echo ::set-output name=TAG_VERSION::${{ github.event.release.tag_name }} - - - name: Extra tag name without v - id: get_version_without_v - run: echo ::set-output name=TAG_VERSION_WITHOUT_V::$(echo "${{ github.event.release.tag_name }}" | sed 's/^v//') - - - name: Extract package_file_name - id: get_package_file_name - run: echo ::set-output name=PACKAGE_FILE_NAME::siyuan-${{ steps.get_version_without_v.outputs.TAG_VERSION_WITHOUT_V }}-linux.AppImage - - - name: Create PKGBUILD - run: | - cat << EOF >> PKGBUILD - # maintainer: zxkmm (IHp4a21tQGhvdG1haWwuY29t) - # auto running on siyuan official repo - # PKGBUILD is modified from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=siyuan-appimage - # which is made by vvxxp8 - - pkgname=siyuan_stable - pkgver=${{ steps.get_version.outputs.TAG_VERSION }} - pkgrel=0 - pkgdesc="auto upload to AUR when SiYuan stable release" - arch=("x86_64") - url="https://b3log.org/siyuan" - license=("AGPL-3.0-only") - _pkgname=${{ steps.get_package_file_name.outputs.PACKAGE_FILE_NAME }} - noextract=(${{ steps.get_package_file_name.outputs.PACKAGE_FILE_NAME }}) - options=("!strip" "!debug") - depends=("fuse2") - optdepends=('pandoc: docx export') - source=("\${_pkgname}::https://github.com/siyuan-note/siyuan/releases/download/${{ steps.get_version.outputs.TAG_VERSION }}/${{ steps.get_package_file_name.outputs.PACKAGE_FILE_NAME }}") - sha256sums=('SKIP') - - _installdir=/opt/appimages - - prepare() { - chmod a+x \${_pkgname} - ./\${_pkgname} --appimage-extract >/dev/null - sed -i "s+AppRun+\${_installdir}/siyuan.AppImage+" "squashfs-root/siyuan.desktop" - sed -i "s+^Icon=.*+Icon=siyuan_stable+" "squashfs-root/siyuan.desktop" - } - - package() { - install -Dm755 \${_pkgname} "\${pkgdir}/\${_installdir}/siyuan.AppImage" - install -Dm644 "squashfs-root/resources/stage/icon.png" "\${pkgdir}/usr/share/icons/hicolor/512x512/apps/siyuan_stable.png" - install -Dm644 "squashfs-root/siyuan.desktop" "\${pkgdir}/usr/share/applications/siyuan_stable.desktop" - } - EOF - - - name: Publish AUR package - uses: KSXGitHub/github-actions-deploy-aur@v2.7.1 - with: - pkgname: siyuan_stable - pkgbuild: ./PKGBUILD - commit_username: ${{ secrets.AUR_USERNAME }} - commit_email: ${{ secrets.AUR_EMAIL }} - ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} - commit_message: Update AUR package - ssh_keyscan_types: rsa,dsa,ecdsa,ed25519 diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml deleted file mode 100644 index bf16d4d211f..00000000000 --- a/.github/workflows/dockerimage.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Release Docker Image - -on: - workflow_dispatch: - inputs: - image_tag: - description: '镜像标签,留空则使用 package.json 中的版本号。务必注意:请确认选择了正确的分支。完整输入示例:3.0.11-rc0 ' - required: true - default: '' - push: - branches: - - master - -# ref https://docs.github.com/zh/actions/learn-github-actions/variables -env: - repo_name_android: "siyuan-android" - repo_name: "siyuan" - repo_owner: "siyuan-note" - package_json: "app/package.json" - docker_hub_owner: "b3log" - docker_hub_repo: "siyuan" - -jobs: - build: - name: build - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - - steps: - - name: Checkout repository and submodules - uses: actions/checkout@v4 - with: - ref: ${{ github.event.ref }} - submodules: recursive - - - name: Extract version from package.json - uses: sergeysova/jq-action@v2 - id: version - with: - cmd: "jq .version ${{ env.package_json }} -r" - - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - # this might remove tools that are actually needed, - # if set to "true" but frees about 6 GB - tool-cache: false - - # all of these default to true, but feel free to set to - # "false" if necessary for your workflow - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_PWD }} - - - name: Build the Docker image use Workflow Dispatch inputs' version - if: ${{ github.event_name == 'workflow_dispatch' && !github.event.inputs.image_tag == '' }} - run: | - docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:latest -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:v${{ github.event.inputs.image_tag }} . - - name: Build the Docker image use package_json version - if: ${{ github.event_name == 'push' || github.event.inputs.image_tag == '' }} - run: | - docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:latest -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:v${{ steps.version.outputs.value }} . - diff --git a/.github/workflows/target-branch.yml b/.github/workflows/target-branch.yml deleted file mode 100644 index e644c8305c3..00000000000 --- a/.github/workflows/target-branch.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Make sure new PRs are sent to dev - -on: - pull_request_target: - types: [opened, edited] - -jobs: - check-branch: - runs-on: ubuntu-latest - steps: - - uses: Vankka/pr-target-branch-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - target: master - exclude: dev - change-to: dev - comment: | - Your PR was set to target `master`, PRs should be target `dev` - The base branch of this PR has been automatically changed to `dev`, please check that there are no merge conflicts