Fix release #6
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: Release | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "8.x" | ||
- name: Display dotnet version | ||
run: dotnet --version | ||
- name: Compile | ||
run: make | ||
- name: Zip rules directory | ||
run: | | ||
mkdir MxLintExtension | ||
cp bin/Debug/net8.0/* MxLintExtension | ||
zip -r extension.zip MxLintExtension | ||
- name: Get release | ||
id: get_release | ||
run: | | ||
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | ||
echo "upload_url=${{ github.event.release.upload_url }}" >> $GITHUB_OUTPUT | ||
- name: Upload Release Asset (ZIP) | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./extension.zip | ||
asset_name: MxLintExtension-${{ steps.get_release.outputs.tag_name}}.zip | ||
asset_content_type: application/zip | ||