t e s t #8
Workflow file for this run
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
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.4" | |
| - name: Get version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Build | |
| run: ./scripts/build.sh ${{ steps.version.outputs.VERSION }} | |
| - name: Upload to R2 | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }} | |
| run: | | |
| aws configure set default.s3.signature_version s3v4 | |
| for file in ./dist/*; do | |
| aws s3 cp "$file" "s3://releases/mineframe/plugstep/${{ steps.version.outputs.VERSION }}/$(basename $file)" \ | |
| --endpoint-url "$R2_ENDPOINT" | |
| done | |
| echo -n "${{ steps.version.outputs.VERSION }}" > latest | |
| aws s3 cp latest "s3://releases/mineframe/plugstep/latest" --endpoint-url "$R2_ENDPOINT" |