Skip to content

Commit 77dad72

Browse files
committed
should be done
1 parent aa80191 commit 77dad72

File tree

1 file changed

+61
-71
lines changed

1 file changed

+61
-71
lines changed

.github/workflows/build-and-release.yml

Lines changed: 61 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -15,60 +15,60 @@ on:
1515
default: true
1616

1717
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
7070
release:
71-
# needs: build
71+
needs: build
7272
runs-on: ubuntu-latest
7373
outputs:
7474
commit_hash: ${{ steps.empty-commit.outputs.commit_hash }}
@@ -103,29 +103,19 @@ jobs:
103103
commit_options: "--allow-empty"
104104
push_options: "--force"
105105
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
116106
- name: Checkout backup-utils-private for release notes
117107
uses: actions/checkout@v4
118108
with:
119109
token: ${{ steps.app-token.outputs.token }}
120110
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
129119
- name: Create Release
130120
uses: ncipollo/release-action@v1
131121
with:

0 commit comments

Comments
 (0)