Prepare release 0.27.4 #40
Workflow file for this run
This file contains hidden or 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: 📦 Prepare Release | |
| run-name: Prepare release ${{ github.ref_name }} | |
| on: | |
| push: | |
| tags: | |
| - '**' | |
| permissions: | |
| contents: write | |
| env: | |
| BUILD_VERSION: ${{ github.ref_name }} | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.100 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install extension dependencies | |
| working-directory: vscode-fscript | |
| run: npm ci | |
| - name: Sync extension version to tag | |
| shell: bash | |
| working-directory: vscode-fscript | |
| run: | | |
| TAG_VERSION="${GITHUB_REF_NAME}" | |
| npm version "$TAG_VERSION" --no-git-tag-version --allow-same-version | |
| - name: Build and stage language server | |
| shell: bash | |
| run: | | |
| rm -rf vscode-fscript/server | |
| dotnet publish src/FScript.LanguageServer/FScript.LanguageServer.fsproj -c Release -o vscode-fscript/server | |
| - name: Install extension packaging tool | |
| run: npm install -g @vscode/vsce@3.5 | |
| - name: Package extension | |
| working-directory: vscode-fscript | |
| run: vsce package | |
| - name: Publish artifacts | |
| run: make publish-all config=Release version=${{ env.BUILD_VERSION }} | |
| - name: Pack release archives | |
| run: | | |
| (cd .out/dotnet; zip ../fscript-${BUILD_VERSION}-dotnet.zip ./*) | |
| (cd .out/windows/x64; zip ../../fscript-${BUILD_VERSION}-windows-x64.zip ./*) | |
| (cd .out/windows/arm64; zip ../../fscript-${BUILD_VERSION}-windows-arm64.zip ./*) | |
| (cd .out/linux/x64; zip ../../fscript-${BUILD_VERSION}-linux-x64.zip ./*) | |
| (cd .out/linux/arm64; zip ../../fscript-${BUILD_VERSION}-linux-arm64.zip ./*) | |
| cp entitlements.plist .out/darwin/entitlements.plist | |
| (cd .out/darwin; zip -r ../fscript-${BUILD_VERSION}-darwin-unsigned.zip ./*) | |
| - name: Extract version suffix | |
| run: | | |
| s=${{ github.ref_name }} | |
| pat="([^-]*)-?([^-]*)" | |
| [[ $s =~ $pat ]] | |
| BUILD_VERSION_SUFFIX=${BASH_REMATCH[2]} | |
| echo "BUILD_VERSION_SUFFIX=$BUILD_VERSION_SUFFIX" >> $GITHUB_ENV | |
| - name: Create draft GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| draft: true | |
| prerelease: ${{ env.BUILD_VERSION_SUFFIX != '' }} | |
| generate_release_notes: true | |
| files: | | |
| .out/*.zip | |
| .out/*.nupkg | |
| vscode-fscript/*.vsix |