Repository navigation
Release v1.24.2 #31
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: Main Release | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| if: | | |
| github.event.pull_request.merged == true && | |
| (startsWith(github.head_ref, 'release/') || startsWith(github.head_ref, 'hotfix/')) | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.LICHTBLICK_GITHUB_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 18 | |
| - name: Enable corepack | |
| run: corepack enable yarn | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Determine version bump type | |
| id: bump_type | |
| run: | | |
| branch_name="${GITHUB_HEAD_REF}" | |
| if [[ "$branch_name" == hotfix/* ]]; then | |
| echo "type=patch" >> "$GITHUB_ENV" | |
| elif [[ "$branch_name" =~ ^release/major(/.*)?$ ]]; then | |
| echo "type=major" >> "$GITHUB_ENV" | |
| elif [[ "$branch_name" =~ ^release/minor(/.*)?$ ]]; then | |
| echo "type=minor" >> "$GITHUB_ENV" | |
| else | |
| echo "ERROR: Invalid branch name: $branch_name | |
| Expected one of: | |
| - hotfix/<name> | |
| - release/major/<anything> | |
| - release/minor/<anything>" >&2 | |
| exit 1 | |
| fi | |
| - name: Bump root version | |
| run: yarn version ${{ env.type }} | |
| - name: Bump suite version | |
| working-directory: packages/suite | |
| run: yarn version ${{ env.type }} | |
| - name: Get new version | |
| id: get_version | |
| run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | |
| - name: Commit and tag | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add package.json packages/suite/package.json yarn.lock | |
| git commit -m "chore: release v${{ env.version }} [skip actions]" | |
| git tag "v${{ env.version }}" | |
| git push origin main --tags | |
| - name: Build prod files | |
| run: | | |
| yarn run desktop:build:prod | |
| yarn run web:build:prod | |
| - name: Build Windows | |
| run: yarn run package:win | |
| - name: Build Linux | |
| run: yarn run package:linux | |
| - name: Build macOS | |
| run: yarn run package:darwin | |
| - name: Create web static files tarball | |
| run: tar -czf dist/lichtblick-web.tar.gz -C web/.webpack . | |
| - name: Create GitHub Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: "v${{ env.version }}" | |
| name: "v${{ env.version }}" | |
| commit: main | |
| generateReleaseNotes: true | |
| token: ${{ secrets.LICHTBLICK_GITHUB_TOKEN }} | |
| artifacts: | | |
| dist/lichtblick-${{ env.version }}-linux-amd64.deb | |
| dist/lichtblick-${{ env.version }}-linux-x64.tar.gz | |
| dist/lichtblick-${{ env.version }}-linux-arm64.deb | |
| dist/lichtblick-${{ env.version }}-linux-arm64.tar.gz | |
| dist/lichtblick-${{ env.version }}-mac-universal.dmg | |
| dist/lichtblick-${{ env.version }}-win.exe | |
| dist/lichtblick-web.tar.gz | |
| dist/latest-linux.yml | |
| dist/latest-mac.yml | |
| dist/latest.yml |