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