Skip to content

Commit

Permalink
chore: upgrade dae-wing (#41)
Browse files Browse the repository at this point in the history
ci: add a workflow to synchronize upstream repositories (#43)

* ci: add a workflow to synchronize upstream dae-wing with workflow_dispatch

* ci(sync): fix sync commit message

* ci(sync): change name to Synchronize upstream

Co-authored-by: Kevin Yu <[email protected]>

* ci(sync): rename sync.yml to sync-upstream-source.yml

* ci(sync): change name to Synchronize Upstream

---------

Co-authored-by: Kevin Yu <[email protected]>

ci(sync): input variables should be retrived from inputs

ci(sync): should clone full history with fetch-depth: 0

ci(build.yml): fix upload to release
  • Loading branch information
Markson committed Jun 17, 2023
1 parent eb6fb93 commit 9049386
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 19 deletions.
68 changes: 50 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
- name: Create full source ZIP archive and Signature
run: |
zip -9vr daed-full-src.zip . -x .git/\*
FILE=./daed-full-src.zip
DGST=$FILE.dgst
md5sum $FILE >>$DGST
shasum -a 1 $FILE >>$DGST
shasum -a 256 $FILE >>$DGST
shasum -a 512 $FILE >>$DGST
- name: Upload artifact - full source
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -182,11 +176,26 @@ jobs:
- name: Smoking test
if: matrix.goarch == 'amd64' && matrix.goamd64 == 'v1'
run: ./bundled/${{ steps.get_filename.outputs.BUNDLE_NAME }} --version

- name: Upload artifact - bundle
if: ${{ github.event_name != 'release' }}
uses: actions/upload-artifact@v3
with:
name: ${{ steps.get_filename.outputs.BUNDLE_NAME }}
path: bundled/*

- name: Create binary ZIP archive
if: ${{ github.event_name == 'release' }}
run: |
zip -9vr ./${{ steps.get_filename.outputs.BUNDLE_NAME }}.zip ./bundled/*
- name: Upload ZIP archive
if: ${{ github.event_name == 'release' }}
uses: nanoufo/[email protected]
with:
path: |
${{ steps.get_filename.outputs.BUNDLE_NAME }}.zip
- name: Build Linux packages
if: ${{ env.GOARM != '5' && env.GOARM != '6' }}
run: |
Expand All @@ -212,30 +221,36 @@ jobs:
cp bundled/daed-linux-$GOARCH$GOAMD64$GOARM.pacman installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst
fi
- name: Upload artifact - packages
- name: Upload Linux packages
if: ${{ env.GOARM != '5' && env.GOARM != '6' }}
uses: nanoufo/[email protected]
with:
path: |
${{ steps.get_filename.outputs.BUNDLE_NAME }}.zip
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.deb
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.rpm
installer-${{ steps.get_filename.outputs.BUNDLE_NAME }}.pkg.tar.zst
upload-release:
if: github.event_name == 'release'
needs: [full-src, build-bundle]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: release/

- name: Generate signature file
working-directory: release
- name: Prepare files for upload
run: |
ls ./ -lh
for package in $(ls | grep -E ".deb|.pkg.tar.zst|.rpm|.zip");do
cp release/*/*.deb ./
cp release/*/*.rpm ./
cp release/*/*.pkg.tar.zst ./
cp release/*/*.zip ./
zip -9vr web.zip release/web
tar -zcvf web.tar.gz release/web
zip -9vr daed-full-src.zip release/daed-full-src/*
tar -zcvf daed-full-src.tar.gz release/daed-full-src
for package in $(ls | grep -E ".deb|.pkg.tar.zst|.rpm|.zip|.tar.gz");do
md5sum $package >> $package.dgst
shasum -a 1 $package >> $package.dgst
shasum -a 256 $package >> $package.dgst
Expand All @@ -247,23 +262,35 @@ jobs:
with:
tag_name: ${{ github.ref }}
files: |
release/*
*zip
*tar.gz
*pkg.tar.zst
*deb
*rpm
*dgst
generate_release_notes: true

upload-prerelease:
if: github.ref == 'refs/heads/develop'
needs: [full-src, build-bundle]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: release/

- name: Generate signature file
working-directory: release
- name: Prepare files for upload
run: |
ls ./ -lh
for package in $(ls | grep -E ".deb|.pkg.tar.zst|.rpm|.zip");do
cp release/*/*.deb ./
cp release/*/*.rpm ./
cp release/*/*.pkg.tar.zst ./
cp release/*/*.zip ./
zip -9vr web.zip release/web
tar -zcvf web.tar.gz release/web
zip -9vr daed-full-src.zip release/daed-full-src/*
tar -zcvf daed-full-src.tar.gz release/daed-full-src
for package in $(ls | grep -E ".deb|.pkg.tar.zst|.rpm|.zip|.tar.gz");do
md5sum $package >> $package.dgst
shasum -a 1 $package >> $package.dgst
shasum -a 256 $package >> $package.dgst
Expand All @@ -282,6 +309,11 @@ jobs:
with:
tag_name: Prerelease
files: |
release/*
*zip
*tar.gz
*pkg.tar.zst
*deb
*rpm
*dgst
prerelease: true
generate_release_notes: true
34 changes: 34 additions & 0 deletions .github/workflows/sync-upstream-source.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Synchronize Upstream

on:
workflow_dispatch:
inputs:
wing-head:
type: string
required: true
default: HEAD
wing-sync-message:
type: string
required: true
default: 'chore: upgrade dae-wing'

jobs:
sync-wing:
runs-on: ubuntu-latest
if: ${{ inputs.wing-head }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0

- name: sync wing
run: |
git checkout ${{ inputs.wing-head }}
working-directory: wing

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: ${{ inputs.wing-sync-message }}
create_branch: true
branch: sync-wing

0 comments on commit 9049386

Please sign in to comment.