|
15 | 15 | default: true
|
16 | 16 |
|
17 | 17 | jobs:
|
18 |
| - # build: |
19 |
| - # runs-on: ubuntu-latest |
20 |
| - # outputs: |
21 |
| - # rc-app-token: ${{ steps.app-token.outputs.token }} |
22 |
| - # steps: |
23 |
| - # - uses: actions/create-github-app-token@v1 |
24 |
| - # id: app-token |
25 |
| - # with: |
26 |
| - # app-id: ${{ vars.RELEASE_CONTROLLER_APP_ID }} |
27 |
| - # private-key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }} |
28 |
| - # owner: ${{ github.repository_owner }} |
29 |
| - # repositories: "backup-utils-private" |
30 |
| - # - name: Checkout backup-utils-private |
31 |
| - # uses: actions/checkout@v4 |
32 |
| - # with: |
33 |
| - # token: ${{ steps.app-token.outputs.token }} |
34 |
| - # - name: Install dependencies |
35 |
| - # run: | |
36 |
| - # sudo apt-get update -y |
37 |
| - # sudo apt-get install -y moreutils debhelper help2man devscripts gzip |
38 |
| - # - name: Create tag # this is required for the build scripts |
39 |
| - # run: | |
40 |
| - # git config user.name "${{ github.actor }}" |
41 |
| - # git config user.email "[email protected]" |
42 |
| - # git tag -a "v${{ github.event.inputs.version }}" -m "v${{ github.event.inputs.version }}" |
43 |
| - # git push origin "v${{ github.event.inputs.version }}" |
44 |
| - # - name: Package deb |
45 |
| - # run: | |
46 |
| - # ./script/package-deb |
47 |
| - # # many need to remove this once release-notes compilation is automated |
48 |
| - # - name: Rename deb artifact |
49 |
| - # run: | |
50 |
| - # for file in dist/github-backup-utils_*_all.deb; do |
51 |
| - # if [[ -f "$file" ]]; then |
52 |
| - # mv "$file" "dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb" |
53 |
| - # fi |
54 |
| - # done |
55 |
| - # - name: Upload deb artifact |
56 |
| - # uses: actions/upload-artifact@v3 |
57 |
| - # with: |
58 |
| - # name: github-backup-utils_${{ github.event.inputs.version }}_all.deb |
59 |
| - # path: | |
60 |
| - # dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb |
61 |
| - # - name: Package tarball |
62 |
| - # run: | |
63 |
| - # ./script/package-tarball |
64 |
| - # - name: Upload tarball artifact |
65 |
| - # uses: actions/upload-artifact@v3 |
66 |
| - # with: |
67 |
| - # name: github-backup-utils-v${{ github.event.inputs.version }}.tar.gz |
68 |
| - # path: | |
69 |
| - # dist/github-backup-utils-v${{ github.event.inputs.version }}.tar.gz |
| 18 | + build: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + outputs: |
| 21 | + rc-app-token: ${{ steps.app-token.outputs.token }} |
| 22 | + steps: |
| 23 | + - uses: actions/create-github-app-token@v1 |
| 24 | + id: app-token |
| 25 | + with: |
| 26 | + app-id: ${{ vars.RELEASE_CONTROLLER_APP_ID }} |
| 27 | + private-key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }} |
| 28 | + owner: ${{ github.repository_owner }} |
| 29 | + repositories: "backup-utils-private" |
| 30 | + - name: Checkout backup-utils-private |
| 31 | + uses: actions/checkout@v4 |
| 32 | + with: |
| 33 | + token: ${{ steps.app-token.outputs.token }} |
| 34 | + - name: Install dependencies |
| 35 | + run: | |
| 36 | + sudo apt-get update -y |
| 37 | + sudo apt-get install -y moreutils debhelper help2man devscripts gzip |
| 38 | + - name: Create tag # this is required for the build scripts |
| 39 | + run: | |
| 40 | + git config user.name "${{ github.actor }}" |
| 41 | + git config user.email "[email protected]" |
| 42 | + git tag -a "v${{ github.event.inputs.version }}" -m "v${{ github.event.inputs.version }}" |
| 43 | + git push origin "v${{ github.event.inputs.version }}" |
| 44 | + - name: Package deb |
| 45 | + run: | |
| 46 | + ./script/package-deb |
| 47 | + # many need to remove this once release-notes compilation is automated |
| 48 | + - name: Rename deb artifact |
| 49 | + run: | |
| 50 | + for file in dist/github-backup-utils_*_all.deb; do |
| 51 | + if [[ -f "$file" ]]; then |
| 52 | + mv "$file" "dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb" |
| 53 | + fi |
| 54 | + done |
| 55 | + - name: Upload deb artifact |
| 56 | + uses: actions/upload-artifact@v3 |
| 57 | + with: |
| 58 | + name: github-backup-utils_${{ github.event.inputs.version }}_all.deb |
| 59 | + path: | |
| 60 | + dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb |
| 61 | + - name: Package tarball |
| 62 | + run: | |
| 63 | + ./script/package-tarball |
| 64 | + - name: Upload tarball artifact |
| 65 | + uses: actions/upload-artifact@v3 |
| 66 | + with: |
| 67 | + name: github-backup-utils-v${{ github.event.inputs.version }}.tar.gz |
| 68 | + path: | |
| 69 | + dist/github-backup-utils-v${{ github.event.inputs.version }}.tar.gz |
70 | 70 | release:
|
71 |
| - # needs: build |
| 71 | + needs: build |
72 | 72 | runs-on: ubuntu-latest
|
73 | 73 | outputs:
|
74 | 74 | commit_hash: ${{ steps.empty-commit.outputs.commit_hash }}
|
@@ -103,29 +103,19 @@ jobs:
|
103 | 103 | commit_options: "--allow-empty"
|
104 | 104 | push_options: "--force"
|
105 | 105 | skip_dirty_check: true
|
106 |
| - # - name: Resolve release commit |
107 |
| - # id: resolve-release-commit |
108 |
| - # run: | |
109 |
| - # if [[ -z "${{ github.event.inputs.release_commit_branch }}" ]]; then |
110 |
| - # echo "Using empty commit sha for release commit" |
111 |
| - # echo "release-ref-or-commit=\"${{ steps.empty-commit.outputs.commit_hash }}\"" >> "$GITHUB_OUTPUT" |
112 |
| - # else |
113 |
| - # echo "Using provided commit sha for release commit" |
114 |
| - # echo "release-ref-or-commit=\"${{ github.event.inputs.release_commit_branch }}\"" >> "$GITHUB_OUTPUT" |
115 |
| - # fi |
116 | 106 | - name: Checkout backup-utils-private for release notes
|
117 | 107 | uses: actions/checkout@v4
|
118 | 108 | with:
|
119 | 109 | token: ${{ steps.app-token.outputs.token }}
|
120 | 110 | repository: github/backup-utils-private
|
121 |
| - # - name: Download deb artifact |
122 |
| - # uses: actions/download-artifact@v3 |
123 |
| - # with: |
124 |
| - # name: github-backup-utils_${{ github.event.inputs.version }}_all.deb |
125 |
| - # - name: Download tarball artifact |
126 |
| - # uses: actions/download-artifact@v3 |
127 |
| - # with: |
128 |
| - # name: github-backup-utils-v${{ github.event.inputs.version }}.tar.gz |
| 111 | + - name: Download deb artifact |
| 112 | + uses: actions/download-artifact@v3 |
| 113 | + with: |
| 114 | + name: github-backup-utils_${{ github.event.inputs.version }}_all.deb |
| 115 | + - name: Download tarball artifact |
| 116 | + uses: actions/download-artifact@v3 |
| 117 | + with: |
| 118 | + name: github-backup-utils-v${{ github.event.inputs.version }}.tar.gz |
129 | 119 | - name: Create Release
|
130 | 120 | uses: ncipollo/release-action@v1
|
131 | 121 | with:
|
|
0 commit comments