-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
3 changed files
with
85 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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: | | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Submodule wing
updated
17 files
+3 −0 | .gitmodules | |
+23 −22 | Makefile | |
+13 −5 | cmd/cmd.go | |
+15 −8 | cmd/run.go | |
+1 −0 | dae-core | |
+20 −12 | dae/dae.go | |
+3 −3 | go.mod | |
+2 −4 | go.sum | |
+11 −4 | graphql/query.go | |
+104 −55 | graphql/service/config/mutation_utils.go | |
+5 −5 | graphql/service/dns/mutation_utils.go | |
+5 −7 | graphql/service/dns/resolver.go | |
+11 −2 | graphql/service/general/dae_resolver.go | |
+6 −0 | graphql/service/general/resolver.go | |
+2 −0 | graphql/service/general/schema.go | |
+5 −5 | graphql/service/routing/mutation_utils.go | |
+5 −7 | graphql/service/routing/resolver.go |