loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Build nightly binaries with Actions (#25308)

Co-authored-by: silverwind <me@silverwind.io>

authored by

techknowlogick
silverwind
and committed by
GitHub
0ab9b7f4 86d01968

+61 -147
-135
.drone.yml
··· 1 - --- 2 - kind: pipeline 3 - type: docker 4 - name: release-latest 5 - 6 - platform: 7 - os: linux 8 - arch: amd64 9 - 10 - workspace: 11 - base: /source 12 - path: / 13 - 14 - trigger: 15 - branch: 16 - - main 17 - - "release/*" 18 - event: 19 - - push 20 - paths: 21 - exclude: 22 - - "docs/**" 23 - 24 - volumes: 25 - - name: deps 26 - temp: {} 27 - 28 - steps: 29 - - name: fetch-tags 30 - image: docker:git 31 - pull: always 32 - commands: 33 - - git fetch --tags --force 34 - 35 - - name: deps-frontend 36 - image: node:20 37 - pull: always 38 - commands: 39 - - make deps-frontend 40 - 41 - - name: deps-backend 42 - image: gitea/test_env:linux-1.20-amd64 43 - pull: always 44 - commands: 45 - - make deps-backend 46 - volumes: 47 - - name: deps 48 - path: /go 49 - 50 - - name: static 51 - image: techknowlogick/xgo:go-1.20.x 52 - pull: always 53 - commands: 54 - # Upgrade to node 20 once https://github.com/techknowlogick/xgo/issues/163 is resolved 55 - - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs 56 - - export PATH=$PATH:$GOPATH/bin 57 - - make release 58 - environment: 59 - GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not 60 - TAGS: bindata sqlite sqlite_unlock_notify 61 - DEBIAN_FRONTEND: noninteractive 62 - volumes: 63 - - name: deps 64 - path: /go 65 - 66 - - name: gpg-sign 67 - image: plugins/gpgsign:1 68 - pull: always 69 - settings: 70 - detach_sign: true 71 - excludes: 72 - - "dist/release/*.sha256" 73 - files: 74 - - "dist/release/*" 75 - environment: 76 - GPGSIGN_KEY: 77 - from_secret: gpgsign_key 78 - GPGSIGN_PASSPHRASE: 79 - from_secret: gpgsign_passphrase 80 - 81 - - name: release-branch 82 - image: woodpeckerci/plugin-s3:latest 83 - pull: always 84 - settings: 85 - acl: 86 - from_secret: aws_s3_acl 87 - region: 88 - from_secret: aws_s3_region 89 - bucket: 90 - from_secret: aws_s3_bucket 91 - endpoint: 92 - from_secret: aws_s3_endpoint 93 - path_style: 94 - from_secret: aws_s3_path_style 95 - source: "dist/release/*" 96 - strip_prefix: dist/release/ 97 - target: "/gitea/${DRONE_BRANCH##release/v}" 98 - environment: 99 - AWS_ACCESS_KEY_ID: 100 - from_secret: aws_access_key_id 101 - AWS_SECRET_ACCESS_KEY: 102 - from_secret: aws_secret_access_key 103 - when: 104 - branch: 105 - - "release/*" 106 - event: 107 - - push 108 - 109 - - name: release-main 110 - image: woodpeckerci/plugin-s3:latest 111 - settings: 112 - acl: 113 - from_secret: aws_s3_acl 114 - region: 115 - from_secret: aws_s3_region 116 - bucket: 117 - from_secret: aws_s3_bucket 118 - endpoint: 119 - from_secret: aws_s3_endpoint 120 - path_style: 121 - from_secret: aws_s3_path_style 122 - source: "dist/release/*" 123 - strip_prefix: dist/release/ 124 - target: /gitea/main 125 - environment: 126 - AWS_ACCESS_KEY_ID: 127 - from_secret: aws_access_key_id 128 - AWS_SECRET_ACCESS_KEY: 129 - from_secret: aws_secret_access_key 130 - when: 131 - branch: 132 - - main 133 - event: 134 - - push 135 - 136 1 --- 137 2 kind: pipeline 138 3 name: release-version
+1
.github/workflows/cron-licenses.yml
··· 3 3 on: 4 4 schedule: 5 5 - cron: "7 0 * * 1" # every Monday at 00:07 UTC 6 + workflow_dispatch: 6 7 7 8 jobs: 8 9 cron-licenses:
+1
.github/workflows/cron-translations.yml
··· 3 3 on: 4 4 schedule: 5 5 - cron: "7 0 * * *" # every day at 00:07 UTC 6 + workflow_dispatch: 6 7 7 8 jobs: 8 9 crowdin-pull:
+59
.github/workflows/release-nightly.yml
··· 1 + name: release-nightly-assets 2 + 3 + on: 4 + push: 5 + branches: [ main, release/v* ] 6 + 7 + jobs: 8 + nightly-binary: 9 + runs-on: ubuntu-latest 10 + steps: 11 + - uses: actions/checkout@v3 12 + # fetch all commits instead of only the last as some branches are long lived and could have many between versions 13 + # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 14 + - run: git fetch --unshallow --quiet --tags --force 15 + - uses: actions/setup-go@v4 16 + with: 17 + go-version: ">=1.20" 18 + check-latest: true 19 + - uses: actions/setup-node@v3 20 + with: 21 + node-version: 20 22 + - run: make deps-frontend deps-backend 23 + # xgo build 24 + - run: make release 25 + env: 26 + TAGS: bindata sqlite sqlite_unlock_notify 27 + - name: import gpg key 28 + id: import_gpg 29 + uses: crazy-max/ghaction-import-gpg@v5 30 + with: 31 + gpg_private_key: ${{ secrets.GPGSIGN_KEY }} 32 + passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }} 33 + - name: sign binaries 34 + run: | 35 + for f in dist/release/*; do 36 + 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" 37 + done 38 + # clean branch name to get the folder name in S3 39 + - name: Get cleaned branch name 40 + id: clean_name 41 + run: | 42 + REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//') 43 + echo "Cleaned name is ${REF_NAME}" 44 + echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT" 45 + - name: upload binaries to s3 46 + uses: jakejarvis/s3-sync-action@master 47 + env: 48 + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} 49 + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 50 + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 51 + AWS_REGION: ${{ secrets.AWS_REGION }} 52 + SOURCE_DIR: dist/release 53 + DEST_DIR: gitea/${{ steps.clean_name.outputs.branch }} 54 + nightly-docker: 55 + runs-on: ubuntu-latest 56 + steps: 57 + - uses: actions/checkout@v3 58 + - uses: docker/setup-buildx-action@v1 59 + # 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)
-12
Makefile
··· 837 837 ifeq (,$(findstring gogit,$(TAGS))) 838 838 CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit . 839 839 endif 840 - ifeq ($(CI),true) 841 - cp /build/* $(DIST)/binaries 842 - endif 843 840 844 841 .PHONY: release-linux 845 842 release-linux: | $(DIST_DIRS) 846 843 CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) . 847 - ifeq ($(CI),true) 848 - cp /build/* $(DIST)/binaries 849 - endif 850 844 851 845 .PHONY: release-darwin 852 846 release-darwin: | $(DIST_DIRS) 853 847 CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64,darwin-10.12/arm64' -out gitea-$(VERSION) . 854 - ifeq ($(CI),true) 855 - cp /build/* $(DIST)/binaries 856 - endif 857 848 858 849 .PHONY: release-freebsd 859 850 release-freebsd: | $(DIST_DIRS) 860 851 CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'freebsd/amd64' -out gitea-$(VERSION) . 861 - ifeq ($(CI),true) 862 - cp /build/* $(DIST)/binaries 863 - endif 864 852 865 853 .PHONY: release-copy 866 854 release-copy: | $(DIST_DIRS)