File: tagged-release.yml

package info (click to toggle)
sshcommand 0.20.1-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 196 kB
  • sloc: sh: 379; makefile: 170
file content (69 lines) | stat: -rw-r--r-- 1,799 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
name: "tagged-release"

# yamllint disable-line rule:truthy
on:
  push:
    tags:
      - "*"

permissions:
  attestations: write
  id-token: write
  contents: write

jobs:
  tagged-release:
    name: tagged-release
    runs-on: ubuntu-24.04
    env:
      CI_BRANCH: release
      PACKAGECLOUD_REPOSITORY: dokku/dokku
      VERSION: ${{ github.ref_name }}

    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Get Repository Name
        id: repo-name
        run: |
          echo "REPOSITORY_NAME=$(echo "${{ github.repository }}" | cut -d '/' -f 2)" >> $GITHUB_OUTPUT

      - name: Build binaries
        run: |
          mkdir -p dist
          make version build/linux/${{ steps.repo-name.outputs.REPOSITORY_NAME }}
          cp build/linux/${{ steps.repo-name.outputs.REPOSITORY_NAME }} dist/${{ steps.repo-name.outputs.REPOSITORY_NAME }}

      - name: Setup Ruby
        uses: ruby/setup-ruby@v1.257.0
        with:
          bundler-cache: true
          working-directory: .github

      - name: Build Debian Packages
        run: |
          bundle exec make build/deb/${{ steps.repo-name.outputs.REPOSITORY_NAME }}_${{ github.ref_name }}_all.deb
          cp build/deb/*.deb dist/
        env:
          BUNDLE_GEMFILE: .github/Gemfile

      - name: Upload Artifacts
        uses: actions/upload-artifact@v4
        with:
          name: dist
          path: dist/*

      - name: Release to PackageCloud
        run: bundle exec make release-packagecloud
        env:
          BUNDLE_GEMFILE: .github/Gemfile
          PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

      - name: Release
        uses: softprops/action-gh-release@v2
        with:
          files: dist/*
          generate_release_notes: true
          make_latest: "true"