feat: automate winget release (#1260)

This commit is contained in:
Baptiste Augrain
2022-09-19 07:27:12 +02:00
committed by GitHub
parent a65ecfc37b
commit 03be08e721
8 changed files with 108 additions and 57 deletions

View File

@@ -18,7 +18,7 @@ on:
- '**/*.md'
jobs:
release:
build:
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
@@ -113,8 +113,7 @@ jobs:
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
snap:
if: ${{ false }}
needs: release
needs: build
runs-on: ubuntu-latest
env:
VSCODE_QUALITY: 'insider'
@@ -124,6 +123,8 @@ jobs:
platform:
- amd64
- arm64
# if: needs.build.outputs.SHOULD_DEPLOY == 'yes'
if: ${{ false }}
steps:
- uses: actions/checkout@v3

View File

@@ -18,7 +18,7 @@ on:
- '**/*.md'
jobs:
windows:
build:
runs-on: windows-2019
defaults:
run:
@@ -104,8 +104,34 @@ jobs:
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
- name: Update versions repo
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
run: ./update_version.sh
env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
winget:
needs: build
runs-on: windows-latest
env:
VSCODE_QUALITY: 'insider'
if: needs.build.outputs.SHOULD_DEPLOY == 'yes'
steps:
- uses: actions/checkout@v3
with:
ref: insider
- name: Check version
run: ./stores/winget/check_version.sh
env:
RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }}
- name: Release to WinGet
uses: vedantmgoyal2009/winget-releaser@latest
with:
identifier: VSCodium.VSCodium.Insiders
release-tag: ${{ env.RELEASE_VERSION }}
installers-regex: '\.exe$' # only .exe files
token: ${{ secrets.STRONGER_GITHUB_TOKEN }}
if: env.SHOULD_DEPLOY == 'yes'

View File

@@ -18,7 +18,7 @@ on:
- '**/*.md'
jobs:
release:
build:
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
@@ -111,7 +111,7 @@ jobs:
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
snap:
needs: release
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
@@ -119,6 +119,7 @@ jobs:
platform:
- amd64
- arm64
if: needs.build.outputs.SHOULD_DEPLOY == 'yes'
steps:
- uses: actions/checkout@v3

View File

@@ -18,7 +18,7 @@ on:
- '**/*.md'
jobs:
windows:
build:
runs-on: windows-2019
defaults:
run:
@@ -101,26 +101,30 @@ jobs:
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
- name: Update versions repo
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
run: ./update_version.sh
env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
# - name: Set MS_TAG as job output for release-winget job
# if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
# run: echo "::set-output name=tagname::${{ env.MS_TAG }}"
winget:
needs: build
runs-on: windows-latest
if: needs.build.outputs.SHOULD_DEPLOY == 'yes'
# release-winget:
# name: Release to WinGet
# needs: windows
# if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
# runs-on: windows-latest # action can only be run on windows
# steps:
# - name: Release to WinGet
# uses: vedantmgoyal2009/winget-releaser@latest
# with:
# identifier: VSCodium.VSCodium
# release-tag: ${{ needs.windows.outputs.tagname }}
# installers-regex: '\.exe$' # only .exe files
# token: ${{ secrets.STRONGER_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Check version
run: ./stores/winget/check_version.sh
env:
RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }}
- name: Release to WinGet
uses: vedantmgoyal2009/winget-releaser@latest
with:
identifier: VSCodium.VSCodium.Insiders
release-tag: ${{ env.RELEASE_VERSION }}
installers-regex: '\.exe$' # only .exe files
token: ${{ secrets.STRONGER_GITHUB_TOKEN }}
if: env.SHOULD_DEPLOY == 'yes'