This commit is contained in:
Tim Reimherr 2023-10-18 10:39:35 -04:00
Родитель 3ad603b75e
Коммит 1eb6431c52
1 изменённых файлов: 55 добавлений и 55 удалений

110
.github/workflows/build-and-release.yml поставляемый
Просмотреть файл

@ -19,60 +19,60 @@ on:
default: true
jobs:
build:
runs-on: ubuntu-latest
outputs:
rc-app-token: ${{ steps.app-token.outputs.token }}
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
private-key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: "backup-utils-private"
- name: Checkout backup-utils-private
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y moreutils debhelper help2man devscripts gzip
- name: Create tag # this is required for the build scripts
run: |
git config user.name "${{ github.actor }}"
git config user.email "ghes-releases-team@github.com"
git tag -a "v${{ github.event.inputs.version }}" -m "v${{ github.event.inputs.version }}"
git push origin "v${{ github.event.inputs.version }}"
- name: Package deb
run: |
./script/package-deb
# many need to remove this once release-notes compilation is automated
- name: Rename deb artifact
run: |
for file in dist/github-backup-utils_*_all.deb; do
if [[ -f "$file" ]]; then
mv "$file" "dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb"
fi
done
- name: Upload deb artifact
uses: actions/upload-artifact@v3
with:
name: github-backup-utils_${{ github.event.inputs.version }}_all.deb
path: |
dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb
- name: Package tarball
run: |
./script/package-tarball
- name: Upload tarball artifact
uses: actions/upload-artifact@v3
with:
name: github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
path: |
dist/github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
# build:
# runs-on: ubuntu-latest
# outputs:
# rc-app-token: ${{ steps.app-token.outputs.token }}
# steps:
# - uses: actions/create-github-app-token@v1
# id: app-token
# with:
# app-id: ${{ vars.RELEASE_CONTROLLER_APP_ID }}
# private-key: ${{ secrets.RELEASE_CONTROLLER_APP_PRIVATE_KEY }}
# owner: ${{ github.repository_owner }}
# repositories: "backup-utils-private"
# - name: Checkout backup-utils-private
# uses: actions/checkout@v4
# with:
# token: ${{ steps.app-token.outputs.token }}
# - name: Install dependencies
# run: |
# sudo apt-get update -y
# sudo apt-get install -y moreutils debhelper help2man devscripts gzip
# - name: Create tag # this is required for the build scripts
# run: |
# git config user.name "${{ github.actor }}"
# git config user.email "ghes-releases-team@github.com"
# git tag -a "v${{ github.event.inputs.version }}" -m "v${{ github.event.inputs.version }}"
# git push origin "v${{ github.event.inputs.version }}"
# - name: Package deb
# run: |
# ./script/package-deb
# # many need to remove this once release-notes compilation is automated
# - name: Rename deb artifact
# run: |
# for file in dist/github-backup-utils_*_all.deb; do
# if [[ -f "$file" ]]; then
# mv "$file" "dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb"
# fi
# done
# - name: Upload deb artifact
# uses: actions/upload-artifact@v3
# with:
# name: github-backup-utils_${{ github.event.inputs.version }}_all.deb
# path: |
# dist/github-backup-utils_${{ github.event.inputs.version }}_all.deb
# - name: Package tarball
# run: |
# ./script/package-tarball
# - name: Upload tarball artifact
# uses: actions/upload-artifact@v3
# with:
# name: github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
# path: |
# dist/github-backup-utils-v${{ github.event.inputs.version }}.tar.gz
release:
needs: build
# needs: build
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.empty-commit.outputs.commit_hash }}
@ -91,7 +91,7 @@ jobs:
token: ${{ steps.app-token.outputs.token }}
repository: github/backup-utils
- name: Create empty commit
if: github.event.inputs.release_commit_branch == ''
# if: github.event.inputs.release_commit_branch == ''
uses: stefanzweifel/git-auto-commit-action@v4
id: empty-commit
with:
@ -137,7 +137,7 @@ jobs:
github-backup-utils-v${{ github.event.inputs.version }}.tar.gz, \
github-backup-utils_${{ github.event.inputs.version }}_all.deb
tag: v${{ github.event.inputs.version }}
commit: ${{ steps.empty-commit.outputs.commit_hash }}
commit: 3.9-main
bodyFile: release-notes/${{ github.event.inputs.version }}.md
draft: ${{ github.event.inputs.draft }}
allowUpdates: true