release #27
This file contains 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: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: gaoyb7/rclone | |
ref: feat-115-drive | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.20.2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y%m%d')" | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v3 | |
with: | |
version: latest | |
args: release --snapshot --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Github Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: v1_${{ steps.date.outputs.date }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: dist/*.tar.gz | |
- name: Dockerhub Release | |
run: | | |
docker push gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-amd64 | |
docker push gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-i386 | |
docker push gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-arm64v8 | |
docker push gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-armv7 | |
docker push gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-armv6 | |
docker manifest create gaoyb7/rclone:v1_${{ steps.date.outputs.date }} \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-amd64 \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-i386 \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-arm64v8 \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-armv7 \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-armv6 | |
docker manifest create gaoyb7/rclone:latest \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-amd64 \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-i386 \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-arm64v8 \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-armv7 \ | |
--amend gaoyb7/rclone:v1_${{ steps.date.outputs.date }}-armv6 | |
docker manifest push gaoyb7/rclone:v1_${{ steps.date.outputs.date }} | |
docker manifest push gaoyb7/rclone:latest |