IKHSAN
ENID Baca dalam Bahasa Indonesia

pixies

Public
Branch
master
Latest commit
9b0697f26 October 2026

create_release.yml

Open raw
name: Release

on:
  push:
    tags: ["v*"]

jobs:
  create-release:
    name: "Create Release"
    runs-on: ubuntu-latest
    outputs:
      version: ${{ steps.get_version.outputs.version }}
      release_id: ${{ steps.create_release.outputs.id }}

    steps:
      - name: Checkout project
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Get version from tag
        id: get_version
        run: |
          VERSION="${GITHUB_REF#refs/tags/v}"
          echo "version=$VERSION" >> $GITHUB_OUTPUT

      - name: Create GitHub Release
        id: create_release
        uses: softprops/action-gh-release@v2
        with:
          tag_name: ${{ github.ref }}
          name: Release ${{ steps.get_version.outputs.version }}
          draft: true
          prerelease: false

  build-binaries:
    name: "Build Binaries"
    needs: create-release
    uses: ./.github/workflows/build-binaries.yml
    with:
      version: ${{ needs.create-release.outputs.version }}
      release_id: ${{ needs.create-release.outputs.release_id }}
    secrets: inherit

  build-docker:
    name: "Build Docker"
    needs: create-release
    uses: ./.github/workflows/build-docker.yml
    with:
      version: ${{ needs.create-release.outputs.version }}
    secrets: inherit

  build-msi:
    name: "Build MSI"
    needs: [create-release, build-binaries]
    uses: ./.github/workflows/build-msi.yml
    with:
      version: ${{ needs.create-release.outputs.version }}
      release_id: ${{ needs.create-release.outputs.release_id }}
    secrets: inherit

  finalize-release:
    name: "Finalize Release"
    needs: [create-release, build-binaries, build-docker, build-msi]
    uses: ./.github/workflows/finalize-release.yml
    with:
      version: ${{ needs.create-release.outputs.version }}
      release_id: ${{ needs.create-release.outputs.release_id }}
    secrets: inherit

  cleanup-on-failure:
    name: "Cleanup on Failure"
    runs-on: ubuntu-latest
    needs: [create-release, build-binaries, build-docker, build-msi]
    if: failure()
    steps:
      - name: Delete release
        uses: actions/github-script@v7
        with:
          script: |
            try {
              await github.rest.repos.deleteRelease({
                owner: context.repo.owner,
                repo: context.repo.repo,
                release_id: ${{ needs.create-release.outputs.release_id }}
              });
              console.log('Release deleted');
            } catch (e) {
              console.log('Failed to delete release:', e.message);
            }

      - name: Delete tag
        uses: actions/github-script@v7
        with:
          script: |
            try {
              await github.rest.git.deleteRef({
                owner: context.repo.owner,
                repo: context.repo.repo,
                ref: 'tags/${{ github.ref_name }}'
              });
              console.log('Tag deleted');
            } catch (e) {
              console.log('Failed to delete tag:', e.message);
            }
bytes
3,044
lines
105
Type
yml
Latest commit
26 October 2026