Skip to content

Commit

Permalink
dry run1
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayada1 committed Sep 19, 2023
1 parent b607dd7 commit a48562e
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 102 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,6 @@ jobs:
path: ./src/vscode-bicep/vscode-bicep.vsix
if-no-files-found: error

- name: Publish VSIX
uses: HaaLeo/publish-vscode-extension@v1
with:
# pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
# registryUrl: https://marketplace.visualstudio.com
pat: stub
dryRun: true

build-vs-ext:
name: Build Visual Studio Extension
runs-on: windows-latest
Expand Down
198 changes: 104 additions & 94 deletions .github/workflows/radius-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ jobs:
name: release
path: ${{ env.RELEASE_PATH }}
if-no-files-found: error


publish_release:
if: startsWith(github.ref, 'refs/tags/v')
Expand Down Expand Up @@ -245,103 +246,112 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_RAD_CI_BOT_PAT }}

publish_blob:
if: ${{ github.event_name == 'push' }}
name: Publish to Azure Blob Storage
needs: ["build", "vscode-bicep-build"]
runs-on: ubuntu-latest
strategy:
matrix:
runtime:
- name: windows-x64
id: win-x64
extension: .exe
- name: windows-x64
id: win-arm64
extension: .exe
- name: linux-x64
id: linux-x64
- name: linux-arm
id: linux-arm
- name: linux-arm64
id: linux-arm64
- name: macos-x64
id: osx-x64
- name: macos-arm64
id: osx-arm64
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
submodules: true
- name: Parse release version and set environment variables
run: python ./.github/scripts/get_release_version.py
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: artifacts
path: artifacts
- name: Display artifacts
run: ls -R
working-directory: ./artifacts
- uses: bacongobbler/[email protected]
name: Upload rad-bicep (${{ matrix.runtime.name }})
id: upload-rad-bicep
with:
container_name: ${{ secrets.ASSETS_STORAGE_CONTAINER }}
connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
source_dir: ./artifacts/bicep/${{ matrix.runtime.name }}/
extra_args: "--destination-path ./bicep-extensibility/${{ env.REL_CHANNEL }}/${{ matrix.runtime.name }}/ --pattern rad-bicep${{ matrix.runtime.extension }} --overwrite true"
sync: true
- name: Check uploaded
run: curl --fail https://radiuspublic.blob.core.windows.net/tools/bicep-extensibility/${{ env.REL_CHANNEL }}/${{ matrix.runtime.name }}/rad-bicep${{ matrix.runtime.extension }} -v > out
# publish_blob:
# if: ${{ github.event_name == 'push' }}
# name: Publish to Azure Blob Storage
# needs: ["build", "vscode-bicep-build"]
# runs-on: ubuntu-latest
# strategy:
# matrix:
# runtime:
# - name: windows-x64
# id: win-x64
# extension: .exe
# - name: windows-x64
# id: win-arm64
# extension: .exe
# - name: linux-x64
# id: linux-x64
# - name: linux-arm
# id: linux-arm
# - name: linux-arm64
# id: linux-arm64
# - name: macos-x64
# id: osx-x64
# - name: macos-arm64
# id: osx-arm64
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
# submodules: true
# - name: Parse release version and set environment variables
# run: python ./.github/scripts/get_release_version.py
# - name: Download artifacts
# uses: actions/download-artifact@v2
# with:
# name: artifacts
# path: artifacts
# - name: Display artifacts
# run: ls -R
# working-directory: ./artifacts
# - uses: bacongobbler/[email protected]
# name: Upload rad-bicep (${{ matrix.runtime.name }})
# id: upload-rad-bicep
# with:
# container_name: ${{ secrets.ASSETS_STORAGE_CONTAINER }}
# connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
# source_dir: ./artifacts/bicep/${{ matrix.runtime.name }}/
# extra_args: "--destination-path ./bicep-extensibility/${{ env.REL_CHANNEL }}/${{ matrix.runtime.name }}/ --pattern rad-bicep${{ matrix.runtime.extension }} --overwrite true"
# sync: true
# - name: Check uploaded
# run: curl --fail https://radiuspublic.blob.core.windows.net/tools/bicep-extensibility/${{ env.REL_CHANNEL }}/${{ matrix.runtime.name }}/rad-bicep${{ matrix.runtime.extension }} -v > out

# Only upload it once
- uses: bacongobbler/[email protected]
if: ${{ matrix.runtime.name == 'linux-x64' }}
name: Upload VS Code (channel)
with:
container_name: ${{ secrets.ASSETS_STORAGE_CONTAINER }}
connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
source_dir: ./artifacts/vscode/
extra_args: "--destination-path ./vscode-extensibility/${{ env.REL_CHANNEL }}/ --overwrite true"
sync: true
# # Only upload it once
# - uses: bacongobbler/[email protected]
# if: ${{ matrix.runtime.name == 'linux-x64' }}
# name: Upload VS Code (channel)
# with:
# container_name: ${{ secrets.ASSETS_STORAGE_CONTAINER }}
# connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
# source_dir: ./artifacts/vscode/
# extra_args: "--destination-path ./vscode-extensibility/${{ env.REL_CHANNEL }}/ --overwrite true"
# sync: true

# Logic: If this is a real release (tagged, non-rc) then compare to our existing full
# release and see if it's newer. This prevents a patch release of an older vintage from overwriting
# a newer release
- name: Download version marker file
run: |
curl https://radiuspublic.blob.core.windows.net/version/stable.txt -o current-stable.txt
if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
- name: Get version
id: setcurrentversion
if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
run: echo ::set-output name=version::$(cat current-stable.txt)
- name: Compare versions
uses: madhead/semver-utils@latest
if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
id: compare
with:
version: ${{ env.REL_VERSION }}
compare-to: ${{ steps.setcurrentversion.outputs.version }}.0
- name: Print info (for sanity)
if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
run: |
echo "current stable channel: ${{ steps.setcurrentversion.outputs.version }}"
echo "this build channel: ${{ env.REL_CHANNEL }}"
echo "this build version: ${{ env.REL_VERSION }}"
echo "comparison: ${{ steps.compare.outputs.comparison-result }}"
- uses: bacongobbler/[email protected]
name: Upload VS Code (stable)
if: ${{ success() && (steps.compare.outputs.comparison-result == '>' || steps.compare.outputs.comparison-result == '=')}}
# # Logic: If this is a real release (tagged, non-rc) then compare to our existing full
# # release and see if it's newer. This prevents a patch release of an older vintage from overwriting
# # a newer release
# - name: Download version marker file
# run: |
# curl https://radiuspublic.blob.core.windows.net/version/stable.txt -o current-stable.txt
# if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
# - name: Get version
# id: setcurrentversion
# if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
# run: echo ::set-output name=version::$(cat current-stable.txt)
# - name: Compare versions
# uses: madhead/semver-utils@latest
# if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
# id: compare
# with:
# version: ${{ env.REL_VERSION }}
# compare-to: ${{ steps.setcurrentversion.outputs.version }}.0
# - name: Print info (for sanity)
# if: ${{ success() && env.UPDATE_RELEASE == 'true' }}
# run: |
# echo "current stable channel: ${{ steps.setcurrentversion.outputs.version }}"
# echo "this build channel: ${{ env.REL_CHANNEL }}"
# echo "this build version: ${{ env.REL_VERSION }}"
# echo "comparison: ${{ steps.compare.outputs.comparison-result }}"
# - uses: bacongobbler/[email protected]
# name: Upload VS Code (stable)
# if: ${{ success() && (steps.compare.outputs.comparison-result == '>' || steps.compare.outputs.comparison-result == '=')}}
# with:
# container_name: ${{ secrets.ASSETS_STORAGE_CONTAINER }}
# connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
# source_dir: ./artifacts/vscode/
# extra_args: "--destination-path ./vscode-extensibility/stable/ --overwrite true"
# sync: true

publish_to_marketplace:
name: Publish to VS Marketplace
steps:
- uses: HaaLeo/publish-vscode-extension@v1
name: Publish to VS Marketplace Step
with:
container_name: ${{ secrets.ASSETS_STORAGE_CONTAINER }}
connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }}
source_dir: ./artifacts/vscode/
extra_args: "--destination-path ./vscode-extensibility/stable/ --overwrite true"
sync: true
pat: stub
dryRun: true

delete_artifacts:
name: Delete artifacts
Expand Down

0 comments on commit a48562e

Please sign in to comment.