Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Release

permissions:
contents: write

on:
push:
tags:
Expand All @@ -17,19 +20,39 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Set-up s5cmd
uses: peak/action-setup-s5cmd@main
with:
version: v2.3.0
- name: Build
run: |
GOARCH=${{ matrix.arch }} make build
- name: Package binaries
run: |
M3FS_VER=m3fs_${{ github.ref_name }}_${{ matrix.arch }}
M3FS_LAT=m3fs_latest_${{ matrix.arch }}
cd bin
tar -zcf $M3FS_VER.tar.gz m3fs
sha256sum $M3FS_VER.tar.gz > $M3FS_VER.tar.gz.sha256sum
cp $M3FS_VER.tar.gz $M3FS_LAT.tar.gz
sha256sum $M3FS_LAT.tar.gz > $M3FS_LAT.tar.gz.sha256sum
- uses: softprops/action-gh-release@v2
with:
draft: true
generate_release_notes: true
make_latest: true
files: |
bin/m3fs_${{ github.ref_name }}_${{ matrix.arch }}.tar.gz
bin/m3fs_${{ github.ref_name }}_${{ matrix.arch }}.tar.gz.sha256sum
bin/m3fs_${{ github.ref_name }}_${{ matrix.arch }}.tar.gz.sha256sum
- name: Upload artifacts to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ENDPOINT: ${{ vars.ARTIFACT_ENDPOINT }}
BUCKET: ${{ vars.ARTIFACT_BUCKET }}
run: |
cd bin
s5cmd --endpoint-url ${{ env.ENDPOINT }} cp m3fs_${{ github.ref_name }}_${{ matrix.arch }}.tar.gz s3://${{ env.BUCKET }}/m3fs/
s5cmd --endpoint-url ${{ env.ENDPOINT }} cp m3fs_${{ github.ref_name }}_${{ matrix.arch }}.tar.gz.sha256sum s3://${{ env.BUCKET }}/m3fs/
s5cmd --endpoint-url ${{ env.ENDPOINT }} cp m3fs_latest_${{ matrix.arch }}.tar.gz s3://${{ env.BUCKET }}/m3fs/
s5cmd --endpoint-url ${{ env.ENDPOINT }} cp m3fs_latest_${{ matrix.arch }}.tar.gz.sha256sum s3://${{ env.BUCKET }}/m3fs/
4 changes: 1 addition & 3 deletions scripts/getm3fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ if [ -z "${ARCH}" ]; then
esac
fi

VERSION=$(basename $(curl -s -L -I -o /dev/null -w '%{url_effective}' "https://github.com/open3fs/m3fs/releases/latest"))
echo "The latest version of m3fs is ${VERSION}"

VERSION=latest
DOWNLOAD_URL="https://artifactory.open3fs.com/m3fs/m3fs_${VERSION}_${ARCH}.tar.gz"
echo ""
echo "Downloading m3fs ${VERSION} from ${DOWNLOAD_URL} ..."
Expand Down