diff --git a/.github/workflows/insider-linux.yml b/.github/workflows/insider-linux.yml index 048197a..e1f9dce 100644 --- a/.github/workflows/insider-linux.yml +++ b/.github/workflows/insider-linux.yml @@ -2,6 +2,10 @@ name: insider-linux on: workflow_dispatch: + inputs: + release_version: + type: string + description: Forced release version schedule: - cron: '0 1 * * *' push: @@ -53,6 +57,8 @@ jobs: run: npm install -g yarn - name: Clone VSCode repo + env: + RELEASE_VERSION: ${{ github.event.inputs.release_version }} run: ./get_repo.sh - name: Check PR or cron diff --git a/.github/workflows/insider-macos.yml b/.github/workflows/insider-macos.yml index bd847fe..0b38e1f 100644 --- a/.github/workflows/insider-macos.yml +++ b/.github/workflows/insider-macos.yml @@ -2,6 +2,10 @@ name: insider-macos on: workflow_dispatch: + inputs: + release_version: + type: string + description: Forced release version schedule: - cron: '0 1 * * *' push: @@ -38,6 +42,8 @@ jobs: node-version: 16 - name: Clone VSCode repo + env: + RELEASE_VERSION: ${{ github.event.inputs.release_version }} run: . get_repo.sh - name: Check PR or cron @@ -46,7 +52,6 @@ jobs: - name: Check existing VSCodium tags/releases env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NEW_RELEASE: ${{ github.event.inputs.new_release }} run: . check_tags.sh if: env.SHOULD_DEPLOY == 'yes' diff --git a/.github/workflows/insider-windows.yml b/.github/workflows/insider-windows.yml index 1ef540b..2ac657d 100644 --- a/.github/workflows/insider-windows.yml +++ b/.github/workflows/insider-windows.yml @@ -2,6 +2,10 @@ name: insider-windows on: workflow_dispatch: + inputs: + release_version: + type: string + description: Forced release version schedule: - cron: '0 1 * * *' push: @@ -48,6 +52,8 @@ jobs: python-version: '3.x' - name: Clone VSCode repo + env: + RELEASE_VERSION: ${{ github.event.inputs.release_version }} run: ./get_repo.sh - name: Check PR or cron @@ -56,7 +62,6 @@ jobs: - name: Check existing VSCodium tags/releases env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NEW_RELEASE: ${{ github.event.inputs.new_release }} run: ./check_tags.sh if: env.SHOULD_DEPLOY == 'yes' diff --git a/get_repo.sh b/get_repo.sh index 08fb514..23e16c7 100755 --- a/get_repo.sh +++ b/get_repo.sh @@ -32,12 +32,22 @@ if [[ -z "${RELEASE_VERSION}" ]]; then export RELEASE_VERSION="${MS_TAG}.${date: -5}" fi else - if [[ "${RELEASE_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+$ ]]; - then - MS_TAG="${BASH_REMATCH[1]}" + if [[ "${VSCODE_QUALITY}" == "insider" ]]; then + if [[ "${RELEASE_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+-insider$ ]]; + then + MS_TAG="${BASH_REMATCH[1]}" + else + echo "Bad RELEASE_VERSION: ${RELEASE_VERSION}" + exit 1 + fi else - echo "Bad RELEASE_VERSION: ${RELEASE_VERSION}" - exit 1 + if [[ "${RELEASE_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+$ ]]; + then + MS_TAG="${BASH_REMATCH[1]}" + else + echo "Bad RELEASE_VERSION: ${RELEASE_VERSION}" + exit 1 + fi fi fi