22
22
build :
23
23
runs-on : ubuntu-latest
24
24
steps :
25
+ # this token still gets denied by the backup-utils repo
25
26
# - uses: timreimherr/create-github-app-token@main
26
27
# id: app-token
27
28
# with:
@@ -30,121 +31,101 @@ jobs:
30
31
# private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
31
32
# owner: ${{ github.repository_owner }}
32
33
# repositories: backup-utils,backup-utils-private
33
- - name : Checkout backup-utils
34
+ - name : Checkout backup-utils-private
34
35
uses : actions/checkout@v4
35
36
with :
36
37
token : ${{ github.event.inputs.gh-token }}
38
+ repository : github/backup-utils-private
39
+ - name : Install dependencies
40
+ run : |
41
+ sudo apt-get update -y
42
+ sudo apt-get install -y moreutils debhelper help2man devscripts gzip
43
+ - name : Create tag # this is required for the build scripts
44
+ run : |
45
+ git config user.name "${{ github.actor }}"
46
+ git config user.email "[email protected] "
47
+ git tag -a "v${{ github.event.inputs.version }}" -m "v${{ github.event.inputs.version }}"
48
+ git push origin "v${{ github.event.inputs.version }}"
49
+ - name : Package deb
50
+ run : |
51
+ ./script/package-deb
52
+ # many need to remove this once release-notes compilation is automated
53
+ - name : Rename deb artifact
54
+ run : |
55
+ for file in dist/github-backup-utils_*_all.deb; do
56
+ if [[ -f "$file" ]]; then
57
+ mv "$file" "dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb"
58
+ fi
59
+ done
60
+ - name : Upload deb artifact
61
+ uses : actions/upload-artifact@v3
62
+ with :
63
+ name : github-backup-utils_${{ github.event.inputs.version }}_all.deb
64
+ path : |
65
+ dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb
66
+ - name : Package tarball
67
+ run : |
68
+ ./script/package-tarball
69
+ - name : Upload tarball artifact
70
+ uses : actions/upload-artifact@v3
71
+ with :
72
+ name : github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
73
+ path : |
74
+ dist/github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
75
+ release :
76
+ needs : build
77
+ runs-on : ubuntu-latest
78
+ outputs :
79
+ commit-sha : ${{ steps.empty-commit.outputs.commit-sha }}
80
+ steps :
81
+ # this token still gets denied by the backup-utils repo
82
+ # - uses: timreimherr/create-github-app-token@main
83
+ # id: app-token
84
+ # with:
85
+ # app_id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
86
+ # private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
87
+ # owner: ${{ github.repository_owner }}
88
+ # repositories: backup-utils,backup-utils-private
89
+ - name : Checkout backup-utils
90
+ uses : actions/checkout@v4
91
+ with :
92
+ token : ${{ steps.app-token.outputs.token }}
37
93
repository : github/backup-utils
38
94
ref : master
39
95
- name : Create empty commit in backup-utils
40
96
id : empty-commit
41
97
run : |
42
- git config user.name "release-controller[bot] "
43
- git config user.email "223695+release-controller[bot]@users.noreply. github.com"
98
+ git config user.name "${{ github.actor }} "
99
+ git config user.email "ghes-releases-team@ github.com"
44
100
git commit --allow-empty -m "${{ github.event.inputs.version }} release"
45
101
git push origin master
46
102
echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
47
- - name : Echo Success if commit was created
48
- if : steps.empty-commit.outputs.commit-sha != ''
49
- run : |
50
- echo "Success"
51
- # - name: Checkout backup-utils-private
52
- # uses: actions/checkout@v4
53
- # with:
54
- # token: ${{ steps.app-token.outputs.token }}
55
- # repository: github/backup-utils-private
56
- # - name: Install dependencies
57
- # run: |
58
- # sudo apt-get update -y
59
- # sudo apt-get install -y moreutils debhelper help2man devscripts gzip
60
- # - name: Create tag # this is required for the build scripts
61
- # run: |
62
- # git config user.name "release-controller[bot]"
63
- # git config user.email "[email protected] "
64
- # git tag -a "v${{ github.event.inputs.version }}" -m "v${{ github.event.inputs.version }}"
65
- # git push origin "v${{ github.event.inputs.version }}"
66
- # - name: Package deb
67
- # run: |
68
- # ./script/package-deb
69
- # # many need to remove this once release-notes compilation is automated
70
- # - name: Rename deb artifact
71
- # run: |
72
- # for file in dist/github-backup-utils_*_all.deb; do
73
- # if [[ -f "$file" ]]; then
74
- # mv "$file" "dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb"
75
- # fi
76
- # done
77
- # - name: Upload deb artifact
78
- # uses: actions/upload-artifact@v3
79
- # with:
80
- # name: github-backup-utils_${{ github.event.inputs.version }}_all.deb
81
- # path: |
82
- # dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb
83
- # - name: Package tarball
84
- # run: |
85
- # ./script/package-tarball
86
- # - name: Upload tarball artifact
87
- # uses: actions/upload-artifact@v3
88
- # with:
89
- # name: github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
90
- # path: |
91
- # dist/github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
92
- # release:
93
- # needs: build
94
- # runs-on: ubuntu-latest
95
- # outputs:
96
- # commit-sha: ${{ steps.empty-commit.outputs.commit-sha }}
97
- # steps:
98
- # - uses: timreimherr/create-github-app-token@main
99
- # id: app-token
100
- # with:
101
- # app_id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
102
- # private_key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
103
- # owner: ${{ github.repository_owner }}
104
- # repositories: backup-utils,backup-utils-private
105
- # - name: Checkout backup-utils
106
- # uses: actions/checkout@v4
107
- # with:
108
- # token: ${{ steps.app-token.outputs.token }}
109
- # repository: github/backup-utils
110
- # ref: master
111
- # - name: Create empty commit in backup-utils
112
- # id: empty-commit
113
- # run: |
114
- # git config user.name "release-controller[bot]"
115
- # git config user.email "[email protected] "
116
- # git fetch origin tims-test-branch
117
- # git checkout tims-test-branch
118
- # git commit --allow-empty -m "${{ github.event.inputs.version }} release"
119
- # git push origin tims-test-branch
120
- # echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
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
129
- # - name: Create Release
130
- # uses: ncipollo/release-action@v1
131
- # with:
132
- # token: ${{ steps.app-token.outputs.token }}
133
- # repo: backup-utils
134
- # name: |
135
- # GitHub Enterprise Server Backup Utilities
136
- # v${{ github.event.inputs.version }}
137
- # artifacts: |
138
- # github-backup-utils-v${{ github.event.inputs.version }}.tar.gz, \
139
- # github-backup-utils_${{ github.event.inputs.version }}_all.deb
140
- # # this action will create a tag with this name on the provided commit
141
- # tag: v${{ github.event.inputs.version }}
142
- # # this can be a commit hash or branch name
143
- # commit: ${{ steps.empty-commit.outputs.commit_sha }}
144
- # bodyFile: release-notes/${{ github.event.inputs.version }}.md
145
- # draft: ${{ github.event.inputs.draft }}
146
- # allowUpdates: true
147
- # artifactContentType: "raw"
103
+ - name : Download deb artifact
104
+ uses : actions/download-artifact@v3
105
+ with :
106
+ name : github-backup-utils_${{ github.event.inputs.version }}_all.deb
107
+ - name : Download tarball artifact
108
+ uses : actions/download-artifact@v3
109
+ with :
110
+ name : github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
111
+ - name : Create Release
112
+ uses : ncipollo/release-action@v1
113
+ with :
114
+ token : ${{ github.event.inputs.gh-token }}
115
+ repo : backup-utils
116
+ name : |
117
+ GitHub Enterprise Server Backup Utilities v${{ github.event.inputs.version }}
118
+ artifacts : |
119
+ github-backup-utils-v${{ github.event.inputs.version }}.tar.gz, \
120
+ github-backup-utils_${{ github.event.inputs.version }}_all.deb
121
+ # this action will create a tag with this name on the provided commit
122
+ tag : v${{ github.event.inputs.version }}
123
+ # this can be a commit hash or branch name
124
+ commit : ${{ steps.empty-commit.outputs.commit-sha }}
125
+ bodyFile : release-notes/${{ github.event.inputs.version }}.md
126
+ draft : ${{ github.event.inputs.draft }}
127
+ allowUpdates : true
128
+ artifactContentType : " raw"
148
129
149
130
150
131
0 commit comments