Clarify workflow steps dependency #21
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: Release | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| branches: | |
| - main | |
| jobs: | |
| tests: | |
| uses: ./.github/workflows/tests.yml # Run tests | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [tests] # Require tests to pass before release | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Create archive | |
| run: bun run archive | |
| - name: Install pipeline | |
| run: mkdir -p publish && cd publish && git clone https://github.com/tangibleinc/pipeline | |
| - name: Add latest tag as needed | |
| uses: EndBug/latest-tag@latest | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| - name: Before release script | |
| run: bun run publish/pipeline/before-release.ts | |
| - name: Release tag | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| body_path: publish/release.md | |
| files: publish/*.zip | |
| - name: Release preview at latest commit | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| body_path: publish/release.md | |
| files: publish/*.zip | |
| tag_name: latest | |
| make_latest: true | |
| - name: After release script | |
| run: bun run publish/pipeline/after-release.ts |