-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Build nightly binaries with Actions #25308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
techknowlogick
merged 15 commits into
go-gitea:main
from
techknowlogick:actions-release-nightly
Jun 16, 2023
Merged
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4e3b8ea
switch to Actions for nightly builds
techknowlogick 1b68cce
rm specific container modifications from makefile
techknowlogick 161d095
build frontend outside of container
techknowlogick f7b1df5
add frontend back
techknowlogick 363d5f9
sign binaries wth gpg
techknowlogick 876fb75
upload to s3
techknowlogick a4b5991
rm run on PR
techknowlogick f53f353
Merge branch 'main' into actions-release-nightly
techknowlogick 57b6792
update per feedback and also fix shellcheck issues
techknowlogick fb7394a
Merge branch 'actions-release-nightly' of github.com:techknowlogick/g…
techknowlogick 4b5dfc2
shellcheck
techknowlogick 42fb493
Update .github/workflows/release-nightly.yml
techknowlogick bb87808
shellcheck
techknowlogick 4d2d5ef
Merge branch 'actions-release-nightly' of github.com:techknowlogick/g…
techknowlogick 0c3151e
Merge branch 'main' into actions-release-nightly
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,59 @@ | ||
name: release-nightly-assets | ||
|
||
on: | ||
push: | ||
branches: [ main, release/v* ] | ||
|
||
jobs: | ||
nightly-binary: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# fetch all commits instead of only the last as some branches are long lived and could have many between versions | ||
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 | ||
- run: git fetch --unshallow --quiet --tags --force | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ">=1.20" | ||
check-latest: true | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- run: make deps-frontend deps-backend | ||
# xgo build | ||
- run: make release | ||
env: | ||
TAGS: bindata sqlite sqlite_unlock_notify | ||
- name: import gpg key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
with: | ||
gpg_private_key: ${{ secrets.GPGSIGN_KEY }} | ||
passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }} | ||
- name: sign binaries | ||
run: | | ||
for f in dist/release/*; do | ||
echo '${{ secrets.GPGSIGN_PASSPHRASE }}' | gpg --pinentry-mode loopback --passphrase-fd 0 --batch --yes --detach-sign -u ${{ steps.import_gpg.outputs.fingerprint }} --output "$f.asc" "$f" | ||
done | ||
# clean branch name to get the folder name in S3 | ||
- name: Get cleaned branch name | ||
id: clean_name | ||
run: | | ||
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//') | ||
echo "Cleaned name is ${REF_NAME}" | ||
echo "branch=${REF_NAME}" >> $GITHUB_OUTPUT | ||
- name: upload binaries to s3 | ||
uses: jakejarvis/s3-sync-action@master | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
SOURCE_DIR: dist/release | ||
DEST_DIR: gitea/${{ steps.clean_name.outputs.branch }} | ||
nightly-docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: docker/setup-buildx-action@v1 | ||
# build for linux/amd64, and linux/arm64 (possibly include linux/arm/v7 later. not included now because it adds significant amount to the build time) |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.