Merge pull request #75 from bnema/fix/release-ci-adwaita
ci(release): simplify tag release workflow
2 files · +6 -71
M .github/workflows/ci.yml +2 -0
| @@ -11,6 +11,7 @@ on: | |||
| 11 | 11 | - 'Makefile' | |
| 12 | 12 | - 'sqlc.yaml' | |
| 13 | 13 | - 'assets/**' | |
| 14 | + | - '.github/workflows/**' | |
| 14 | 15 | - '!**.md' | |
| 15 | 16 | - '!docs/**' | |
| 16 | 17 | - '!LICENSE' | |
| @@ -23,6 +24,7 @@ on: | |||
| 23 | 24 | - 'Makefile' | |
| 24 | 25 | - 'sqlc.yaml' | |
| 25 | 26 | - 'assets/**' | |
| 27 | + | - '.github/workflows/**' | |
| 26 | 28 | - '!**.md' | |
| 27 | 29 | - '!docs/**' | |
| 28 | 30 | - '!LICENSE' | |
| @@ -11,6 +11,7 @@ on: | |||||
| 11 | - 'Makefile' | 11 | - 'Makefile' | ||
| 12 | - 'sqlc.yaml' | 12 | - 'sqlc.yaml' | ||
| 13 | - 'assets/**' | 13 | - 'assets/**' | ||
| 14 | + | - '.github/workflows/**' | |||
| 14 | - '!**.md' | 15 | - '!**.md' | ||
| 15 | - '!docs/**' | 16 | - '!docs/**' | ||
| 16 | - '!LICENSE' | 17 | - '!LICENSE' | ||
| @@ -23,6 +24,7 @@ on: | |||||
| 23 | - 'Makefile' | 24 | - 'Makefile' | ||
| 24 | - 'sqlc.yaml' | 25 | - 'sqlc.yaml' | ||
| 25 | - 'assets/**' | 26 | - 'assets/**' | ||
| 27 | + | - '.github/workflows/**' | |||
| 26 | - '!**.md' | 28 | - '!**.md' | ||
| 27 | - '!docs/**' | 29 | - '!docs/**' | ||
| 28 | - '!LICENSE' | 30 | - '!LICENSE' | ||
M .github/workflows/release.yml +4 -71
| @@ -1,3 +1,4 @@ | |||
| 1 | + | ||
| 1 | 2 | name: Release | |
| 2 | 3 | ||
| 3 | 4 | on: | |
| @@ -9,94 +10,26 @@ permissions: | |||
| 9 | 10 | contents: write | |
| 10 | 11 | ||
| 11 | 12 | jobs: | |
| 12 | - | check-changes: | |
| 13 | + | release: | |
| 13 | 14 | runs-on: ubuntu-latest | |
| 14 | - | outputs: | |
| 15 | - | should_release: ${{ steps.check.outputs.should_release }} | |
| 16 | 15 | steps: | |
| 17 | 16 | - uses: actions/checkout@v6 | |
| 18 | 17 | with: | |
| 19 | 18 | fetch-depth: 0 | |
| 20 | - | - name: Check for release-worthy changes | |
| 21 | - | id: check | |
| 22 | - | run: | | |
| 23 | - | # Get previous tag | |
| 24 | - | PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") | |
| 25 | - | if [ -z "$PREV_TAG" ]; then | |
| 26 | - | echo "should_release=true" >> $GITHUB_OUTPUT | |
| 27 | - | exit 0 | |
| 28 | - | fi | |
| 29 | - | # Check if any non-doc files changed | |
| 30 | - | CHANGES=$(git diff --name-only $PREV_TAG HEAD | grep -v -E '(\.md$|^docs/|^\.github/workflows/|^LICENSE$)' || true) | |
| 31 | - | if [ -n "$CHANGES" ]; then | |
| 32 | - | echo "should_release=true" >> $GITHUB_OUTPUT | |
| 33 | - | else | |
| 34 | - | echo "should_release=false" >> $GITHUB_OUTPUT | |
| 35 | - | echo "Only docs/CI changes detected, skipping release" | |
| 36 | - | fi | |
| 37 | 19 | ||
| 38 | - | lint: | |
| 39 | - | needs: check-changes | |
| 40 | - | if: needs.check-changes.outputs.should_release == 'true' | |
| 41 | - | runs-on: ubuntu-latest | |
| 42 | - | steps: | |
| 43 | - | - uses: actions/checkout@v6 | |
| 44 | 20 | - uses: actions/setup-go@v6 | |
| 45 | 21 | with: | |
| 46 | 22 | go-version: stable | |
| 47 | - | - uses: actions/setup-node@v6 | |
| 48 | - | with: | |
| 49 | - | node-version: '24' | |
| 50 | - | - name: Install WebKitGTK 6.0 dependencies | |
| 51 | - | run: | | |
| 52 | - | sudo apt-get update | |
| 53 | - | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev | |
| 54 | - | - name: Build frontend assets | |
| 55 | - | run: make build-frontend | |
| 56 | - | - name: Run golangci-lint | |
| 57 | - | uses: golangci/golangci-lint-action@v7 | |
| 58 | - | with: | |
| 59 | - | version: v2.6.2 | |
| 60 | 23 | ||
| 61 | - | test: | |
| 62 | - | needs: check-changes | |
| 63 | - | if: needs.check-changes.outputs.should_release == 'true' | |
| 64 | - | runs-on: ubuntu-latest | |
| 65 | - | steps: | |
| 66 | - | - uses: actions/checkout@v6 | |
| 67 | - | - uses: actions/setup-go@v6 | |
| 68 | - | with: | |
| 69 | - | go-version: stable | |
| 70 | 24 | - uses: actions/setup-node@v6 | |
| 71 | 25 | with: | |
| 72 | 26 | node-version: '24' | |
| 73 | - | - name: Install WebKitGTK 6.0 dependencies | |
| 74 | - | run: | | |
| 75 | - | sudo apt-get update | |
| 76 | - | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev | |
| 77 | - | - name: Build frontend assets | |
| 78 | - | run: make build-frontend | |
| 79 | - | - name: Run tests | |
| 80 | - | run: CGO_ENABLED=1 go test -tags=webkit_cgo -v ./... | |
| 81 | 27 | ||
| 82 | - | release: | |
| 83 | - | needs: [check-changes, lint, test] | |
| 84 | - | if: needs.check-changes.outputs.should_release == 'true' | |
| 85 | - | runs-on: ubuntu-latest | |
| 86 | - | steps: | |
| 87 | - | - uses: actions/checkout@v6 | |
| 88 | - | with: | |
| 89 | - | fetch-depth: 0 | |
| 90 | - | - uses: actions/setup-go@v6 | |
| 91 | - | with: | |
| 92 | - | go-version: stable | |
| 93 | 28 | - name: Install WebKitGTK 6.0 dependencies | |
| 94 | 29 | run: | | |
| 95 | 30 | sudo apt-get update | |
| 96 | - | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev | |
| 97 | - | - uses: actions/setup-node@v6 | |
| 98 | - | with: | |
| 99 | - | node-version: '24' | |
| 31 | + | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev libadwaita-1-dev | |
| 32 | + | ||
| 100 | 33 | - name: Run GoReleaser | |
| 101 | 34 | uses: goreleaser/goreleaser-action@v6 | |
| 102 | 35 | with: | |
| @@ -1,3 +1,4 @@ | |||||
| 1 | + | ||||
| 1 | name: Release | 2 | name: Release | ||
| 2 | 3 | ||||
| 3 | on: | 4 | on: | ||
| @@ -9,94 +10,26 @@ permissions: | |||||
| 9 | contents: write | 10 | contents: write | ||
| 10 | 11 | ||||
| 11 | jobs: | 12 | jobs: | ||
| 12 | - | check-changes: | 13 | + | release: |
| 13 | runs-on: ubuntu-latest | 14 | runs-on: ubuntu-latest | ||
| 14 | - | outputs: | |||
| 15 | - | should_release: ${{ steps.check.outputs.should_release }} | |||
| 16 | steps: | 15 | steps: | ||
| 17 | - uses: actions/checkout@v6 | 16 | - uses: actions/checkout@v6 | ||
| 18 | with: | 17 | with: | ||
| 19 | fetch-depth: 0 | 18 | fetch-depth: 0 | ||
| 20 | - | - name: Check for release-worthy changes | |||
| 21 | - | id: check | |||
| 22 | - | run: | | |||
| 23 | - | # Get previous tag | |||
| 24 | - | PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") | |||
| 25 | - | if [ -z "$PREV_TAG" ]; then | |||
| 26 | - | echo "should_release=true" >> $GITHUB_OUTPUT | |||
| 27 | - | exit 0 | |||
| 28 | - | fi | |||
| 29 | - | # Check if any non-doc files changed | |||
| 30 | - | CHANGES=$(git diff --name-only $PREV_TAG HEAD | grep -v -E '(\.md$|^docs/|^\.github/workflows/|^LICENSE$)' || true) | |||
| 31 | - | if [ -n "$CHANGES" ]; then | |||
| 32 | - | echo "should_release=true" >> $GITHUB_OUTPUT | |||
| 33 | - | else | |||
| 34 | - | echo "should_release=false" >> $GITHUB_OUTPUT | |||
| 35 | - | echo "Only docs/CI changes detected, skipping release" | |||
| 36 | - | fi | |||
| 37 | 19 | ||||
| 38 | - | lint: | |||
| 39 | - | needs: check-changes | |||
| 40 | - | if: needs.check-changes.outputs.should_release == 'true' | |||
| 41 | - | runs-on: ubuntu-latest | |||
| 42 | - | steps: | |||
| 43 | - | - uses: actions/checkout@v6 | |||
| 44 | - uses: actions/setup-go@v6 | 20 | - uses: actions/setup-go@v6 | ||
| 45 | with: | 21 | with: | ||
| 46 | go-version: stable | 22 | go-version: stable | ||
| 47 | - | - uses: actions/setup-node@v6 | |||
| 48 | - | with: | |||
| 49 | - | node-version: '24' | |||
| 50 | - | - name: Install WebKitGTK 6.0 dependencies | |||
| 51 | - | run: | | |||
| 52 | - | sudo apt-get update | |||
| 53 | - | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev | |||
| 54 | - | - name: Build frontend assets | |||
| 55 | - | run: make build-frontend | |||
| 56 | - | - name: Run golangci-lint | |||
| 57 | - | uses: golangci/golangci-lint-action@v7 | |||
| 58 | - | with: | |||
| 59 | - | version: v2.6.2 | |||
| 60 | 23 | ||||
| 61 | - | test: | |||
| 62 | - | needs: check-changes | |||
| 63 | - | if: needs.check-changes.outputs.should_release == 'true' | |||
| 64 | - | runs-on: ubuntu-latest | |||
| 65 | - | steps: | |||
| 66 | - | - uses: actions/checkout@v6 | |||
| 67 | - | - uses: actions/setup-go@v6 | |||
| 68 | - | with: | |||
| 69 | - | go-version: stable | |||
| 70 | - uses: actions/setup-node@v6 | 24 | - uses: actions/setup-node@v6 | ||
| 71 | with: | 25 | with: | ||
| 72 | node-version: '24' | 26 | node-version: '24' | ||
| 73 | - | - name: Install WebKitGTK 6.0 dependencies | |||
| 74 | - | run: | | |||
| 75 | - | sudo apt-get update | |||
| 76 | - | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev | |||
| 77 | - | - name: Build frontend assets | |||
| 78 | - | run: make build-frontend | |||
| 79 | - | - name: Run tests | |||
| 80 | - | run: CGO_ENABLED=1 go test -tags=webkit_cgo -v ./... | |||
| 81 | 27 | ||||
| 82 | - | release: | |||
| 83 | - | needs: [check-changes, lint, test] | |||
| 84 | - | if: needs.check-changes.outputs.should_release == 'true' | |||
| 85 | - | runs-on: ubuntu-latest | |||
| 86 | - | steps: | |||
| 87 | - | - uses: actions/checkout@v6 | |||
| 88 | - | with: | |||
| 89 | - | fetch-depth: 0 | |||
| 90 | - | - uses: actions/setup-go@v6 | |||
| 91 | - | with: | |||
| 92 | - | go-version: stable | |||
| 93 | - name: Install WebKitGTK 6.0 dependencies | 28 | - name: Install WebKitGTK 6.0 dependencies | ||
| 94 | run: | | 29 | run: | | ||
| 95 | sudo apt-get update | 30 | sudo apt-get update | ||
| 96 | - | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev | 31 | + | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev libadwaita-1-dev |
| 97 | - | - uses: actions/setup-node@v6 | 32 | + | |
| 98 | - | with: | |||
| 99 | - | node-version: '24' | |||
| 100 | - name: Run GoReleaser | 33 | - name: Run GoReleaser | ||
| 101 | uses: goreleaser/goreleaser-action@v6 | 34 | uses: goreleaser/goreleaser-action@v6 | ||
| 102 | with: | 35 | with: | ||