Release v1.17.0 #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PublishRelease | |
on: | |
release: | |
types: [published] | |
env: | |
VSIX_FILE_NAME: GitTreeFilter-${{ github.event.release.tag_name }}.vsix | |
jobs: | |
publish: | |
if: github.event.release.draft == false && github.event.release.prerelease == false | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: refs/tags/${{ github.event.release.tag_name }} | |
fetch-depth: '0' | |
- name: Set up Git actions user | |
uses: fregante/setup-git-user@v1 | |
- uses: robinraju/release-downloader@v1 | |
id: download-release-assets | |
with: | |
releaseId: ${{ github.event.release.id }} | |
fileName: ${{ env.VSIX_FILE_NAME }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
zipBall: true | |
extract: true | |
- name: List all files recursively | |
id: extract-release-assets | |
shell: pwsh | |
run: | | |
$repoName = "${{ github.repository }}" # Full repo name in "owner/repo" format | |
$shortRepoOwner = $repoName.Split('/')[0] # Extract short repository owner name | |
$shortRepoName = $repoName.Split('/')[1] # Extract short repository name | |
$commitHash = "${{ github.sha }}"[0..6] -join "" # Get the first 7 characters of the commit hash | |
$directoryName = "$shortRepoOwner-$shortRepoName-$commitHash" | |
"release_sources_root=$directoryName" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | |
- name: Publish extension to Marketplace | |
uses: cezarypiatek/[email protected] | |
with: | |
extension-file: ${{ env.VSIX_FILE_NAME }} | |
publish-manifest-file: '${{ steps.extract-release-assets.outputs.release_sources_root }}/GitTreeFilter/vs-publish.json' | |
personal-access-code: ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }} |