Release Sherlock Platform prebuilt #46
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: Release Sherlock Platform prebuilt | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build-platform: | |
| uses: ./.github/workflows/build.yml | |
| release: | |
| needs: build-platform | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Get SherlockPlatformApplicationInfo.xml Version | |
| id: get_xml_version | |
| run: | | |
| XML_VERSION=$(python .github/scripts/get_version.py) | |
| echo "xml_version=$XML_VERSION" >> $GITHUB_OUTPUT | |
| - name: Define TAG_NAME variable for the release | |
| run: | | |
| echo "TAG_NAME=v${{ steps.get_xml_version.outputs.xml_version }}" >> $GITHUB_ENV | |
| - name: Check for existing release | |
| id: check_release | |
| run: | | |
| if gh release view ${{ env.TAG_NAME }} > /dev/null 2>&1; then | |
| echo "Release ${{ env.TAG_NAME }} already exists. Failing the workflow." | |
| exit 1 | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download Artifacts from Build Workflow | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: sherlock-platform-artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ env.TAG_NAME }} | |
| prerelease: true | |
| files: | | |
| sherlock-platform-artifacts/*/* |