From 25e90153be09e006e1b23ed0b686822776fb0114 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 5 Apr 2020 17:26:29 +0900 Subject: [PATCH] Switch to Azure Pipelines --- .appveyor.yml | 35 ------------------------------- .travis.yml | 40 ------------------------------------ azure-pipelines-template.yml | 39 +++++++++++++++++++++++++++++++++++ azure-pipelines.yml | 30 +++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 75 deletions(-) delete mode 100644 .appveyor.yml delete mode 100644 .travis.yml create mode 100644 azure-pipelines-template.yml create mode 100644 azure-pipelines.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index ddbc76c..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,35 +0,0 @@ -version: "{build}" - -os: Visual Studio 2017 - -init: - - git config --global core.autocrlf input - -platform: - - x64 - -install: - - ps: Install-Product node 12 $env:platform - - cmd: npm install - - cmd: npm run dist - -artifacts: - - path: '*.zip' - -deploy: - - provider: GitHub - release: Wey $(APPVEYOR_REPO_TAG_NAME) - tag: $(APPVEYOR_REPO_TAG_NAME) - description: '(placeholder)' - auth_token: - secure: NgSrGzkhyMVTkMlZI+6sp6QOyzwPzHrwsnDgOlNZcYEGjIh9ucGHPNzub34DunFx - artifact: /.*\.zip/ - draft: true - force_update: true - prerelease: false - on: - appveyor_repo_tag: true - -# disable build and test pahses -build: off -test: off diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2d7c89b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -git: - depth: 10 -notifications: - email: false - -language: node_js -node_js: - - 12 -os: - - osx - - linux -osx_image: xcode10.3 -dist: trusty - -addons: - apt: - packages: - - libsecret-1-dev - -before_script: - - export VERSION=$(git describe --always --tags) - -script: - - npm install - - npm run dist - -deploy: - provider: releases - api_key: - secure: TI6GiwFHRIt5Vg7ko04YsdkS2J17+8H5dmGAE71cywSwD7V93UaYveTLVQ4n+skC40wViWuW+sroEOosc6jKfXXdkWIfxTXcQx2hrf+HOv+jjkmjJd3qACogmF6sXDrm0xD7fLYvljmH0OTQAZEgUfl1SL1PZcKqRLq8sys177yVDeSgAxzwZW5lydxLln1qfkjh7wXBUP7qZBX4AoTtmS5m1DskF8N/W5ZgnqdUReQxiG4HzMyK1yJZUBjVCCvK1ZcnHxsaVPStQyMEB2VrMCAlfifusW9Tzx+r3kvBF1o2Cj5QJp9oyWinNkiJu/LbL2WudF8o6tjN3u9fmyWs6VUadGQKeQH5wIw+n8neCcAkbJ+UWCtLjFfWQVSGtyRXlnI4v7TW1uo94lcKLpz3ymYhKsRmn+HlgBDtX6T0AGBPGrR7uy+SYaAM5yiaepjbBRYVXCmv9nqU2zRHelv/IpXvpVhjMU4k98NMsGvYBpBqRPIVbVsuDSh7mp4AYn2A5F7Q9OCt8Z/nxwKbEPUp7vl8zflZtVCOXkyPlGZeSBwMppAJzIVEj6NvEB4m82gcveaYmXO8Zg+yftjWD6+3fl1RZmnK7yxJaWwu/BUr8isM8MyVacPcKyxFc4X4hSi5KYrqgIli5mUtOCongZmvGx2UzBlsLTA3/2XXunmKIG4= - file_glob: true - file: "*.zip" - skip_cleanup: true - overwrite: true - draft: true - tag_name: ${VERSION} - name: Wey ${VERSION} - body: (placeholder) - on: - tags: true diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml new file mode 100644 index 0000000..5c28dcd --- /dev/null +++ b/azure-pipelines-template.yml @@ -0,0 +1,39 @@ +steps: +- task: NodeTool@0 + inputs: + versionSpec: 12.x + +- task: UsePythonVersion@0 + inputs: + versionSpec: '2.7' + architecture: 'x64' + +- bash: | + npm install + npm run dist + displayName: Build + +- bash: | + BRANCH=$(Build.SourceBranch) + TAG=${BRANCH:10} + echo "##vso[task.setvariable variable=Name;isOutput=true]$TAG" + displayName: Get Tag Name + name: Tag + condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') + +- task: GithubRelease@0 + displayName: Create GitHub Release + condition: startsWith(variables['Tag.Name'], 'v') + inputs: + gitHubConnection: GitHub Yue + repositoryName: yue/wey + action: Edit + tagSource: auto + tag: $(Tag.Name) + title: Wey $(Tag.name) + releaseNotesSource: input + releaseNotes: (placeholder) + assets: '*.zip' + assetUploadMode: replace + isDraft: true + addChangelog: false diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..971169c --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,30 @@ +trigger: +- refs/heads/* +- refs/pull/*/merge +- refs/tags/* + +jobs: +- job: windows_build + displayName: 'Build for Windows' + pool: + vmImage: 'VS2017-Win2016' + steps: + - template: azure-pipelines-template.yml + +- job: macos_build + displayName: 'Build for macOS' + pool: + vmImage: 'macOS-10.14' + steps: + - template: azure-pipelines-template.yml + +- job: linux_build + displayName: 'Build for Linux' + pool: + vmImage: 'ubuntu-18.04' + steps: + - script: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev + displayName: Install dependencies + - template: azure-pipelines-template.yml