mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-06-16 05:55:33 +00:00
update goreleaser
This commit is contained in:
parent
33eacbf4b3
commit
f9a26af93f
66
.github/workflows/release.yml
vendored
66
.github/workflows/release.yml
vendored
@ -8,62 +8,12 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
jobs:
|
jobs:
|
||||||
goreleaser:
|
call-workflow-passing-data:
|
||||||
runs-on: ubuntu-22.04
|
uses: IceWhaleTech/github/.github/workflows/go_release.yml@main
|
||||||
steps:
|
with:
|
||||||
- name: Install dependencies for cross-compiling
|
project-name: CasaOS
|
||||||
run: |
|
file-name: casaos
|
||||||
sudo apt update
|
|
||||||
sudo apt-get --no-install-recommends --yes install \
|
|
||||||
upx libc6-dev-amd64-cross \
|
|
||||||
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
|
|
||||||
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Fetch all tags
|
|
||||||
run: git fetch --force --tags
|
|
||||||
|
|
||||||
- name: Get version
|
|
||||||
id: get_version
|
|
||||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v4
|
|
||||||
with:
|
|
||||||
go-version: "1.20"
|
|
||||||
- name: Run GoReleaser
|
|
||||||
uses: goreleaser/goreleaser-action@v4
|
|
||||||
with:
|
|
||||||
# either 'goreleaser' (default) or 'goreleaser-pro'
|
|
||||||
distribution: goreleaser
|
|
||||||
version: latest
|
|
||||||
args: release --rm-dist
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GoogleID: ${{ secrets.GoogleID }}
|
|
||||||
GoogleSecret: ${{ secrets.GoogleSecret }}
|
|
||||||
DropboxKey: ${{ secrets.DropboxKey }}
|
|
||||||
DropboxSecret: ${{ secrets.DropboxSecret }}
|
|
||||||
OneDriveID: ${{ secrets.OneDriveID }}
|
|
||||||
OneDriveSecret: ${{ secrets.OneDriveSecret }}
|
|
||||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
|
||||||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
|
||||||
|
|
||||||
- name: Upload to oss
|
|
||||||
id: upload_to_oss
|
|
||||||
uses: tvrcgo/upload-to-oss@master
|
|
||||||
with:
|
|
||||||
key-id: ${{ secrets.OSS_KEY_ID }}
|
|
||||||
key-secret: ${{ secrets.OSS_KEY_SECRET }}
|
|
||||||
region: oss-cn-shanghai
|
|
||||||
bucket: casaos
|
|
||||||
assets: |
|
|
||||||
dist/checksums.txt:/IceWhaleTech/CasaOS/releases/download/${{ steps.get_version.outputs.VERSION }}/checksums.txt
|
|
||||||
dist/linux-arm-7-casaos-${{ steps.get_version.outputs.VERSION }}.tar.gz:/IceWhaleTech/CasaOS/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-arm-7-casaos-${{ steps.get_version.outputs.VERSION }}.tar.gz
|
|
||||||
dist/linux-arm64-casaos-${{ steps.get_version.outputs.VERSION }}.tar.gz:/IceWhaleTech/CasaOS/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-arm64-casaos-${{ steps.get_version.outputs.VERSION }}.tar.gz
|
|
||||||
dist/linux-amd64-casaos-${{ steps.get_version.outputs.VERSION }}.tar.gz:/IceWhaleTech/CasaOS/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-amd64-casaos-${{ steps.get_version.outputs.VERSION }}.tar.gz
|
|
||||||
dist/linux-arm-7-casaos-migration-tool-${{ steps.get_version.outputs.VERSION }}.tar.gz:/IceWhaleTech/CasaOS/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-arm-7-casaos-migration-tool-${{ steps.get_version.outputs.VERSION }}.tar.gz
|
|
||||||
dist/linux-arm64-casaos-migration-tool-${{ steps.get_version.outputs.VERSION }}.tar.gz:/IceWhaleTech/CasaOS/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-arm64-casaos-migration-tool-${{ steps.get_version.outputs.VERSION }}.tar.gz
|
|
||||||
dist/linux-amd64-casaos-migration-tool-${{ steps.get_version.outputs.VERSION }}.tar.gz:/IceWhaleTech/CasaOS/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-amd64-casaos-migration-tool-${{ steps.get_version.outputs.VERSION }}.tar.gz
|
|
@ -38,9 +38,9 @@ builds:
|
|||||||
- amd64
|
- amd64
|
||||||
- id: casaos-arm64
|
- id: casaos-arm64
|
||||||
binary: build/sysroot/usr/bin/casaos
|
binary: build/sysroot/usr/bin/casaos
|
||||||
hooks:
|
# hooks:
|
||||||
post:
|
# post:
|
||||||
- upx --best --lzma -v --no-progress "{{ .Path }}"
|
# - upx --best --lzma -v --no-progress "{{ .Path }}"
|
||||||
env:
|
env:
|
||||||
- CC=aarch64-linux-gnu-gcc
|
- CC=aarch64-linux-gnu-gcc
|
||||||
ldflags:
|
ldflags:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user