Track latest version by Major.Minor when releasing via GoReleaser
We want to be able to download the latest published version for a specific Major.Minor. In the Dagger GitHub Action, we want to be able to restrict the versions to e.g. latest 0.2. We took this opportunity to change the URL schema and scope all versions to /versions, e.g. /versions/latest, /versions/0.1, /versions/0.2, etc. Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
This commit is contained in:
parent
17c45ea36c
commit
91c45ade3d
@ -67,7 +67,7 @@ blobs:
|
|||||||
folder: "dagger/releases/{{ .Version }}"
|
folder: "dagger/releases/{{ .Version }}"
|
||||||
|
|
||||||
publishers:
|
publishers:
|
||||||
- name: publish-version
|
- name: publish-latest-version
|
||||||
cmd: sh -c "echo {{ .Version }} | aws s3 cp - s3://dagger-io/dagger/latest_version"
|
cmd: sh -c "echo {{ .Version }} | aws s3 cp - s3://dagger-io/dagger/latest_version"
|
||||||
env:
|
env:
|
||||||
- PATH={{ .Env.PATH }}
|
- PATH={{ .Env.PATH }}
|
||||||
@ -75,3 +75,19 @@ publishers:
|
|||||||
- AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }}
|
- AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }}
|
||||||
- AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }}
|
- AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }}
|
||||||
- AWS_REGION={{ .Env.AWS_REGION }}
|
- AWS_REGION={{ .Env.AWS_REGION }}
|
||||||
|
- name: publish-latest
|
||||||
|
cmd: sh -c "echo {{ .Version }} | aws s3 cp - s3://dagger-io/dagger/versions/latest"
|
||||||
|
env:
|
||||||
|
- PATH={{ .Env.PATH }}
|
||||||
|
- AWS_EC2_METADATA_DISABLED=true
|
||||||
|
- AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }}
|
||||||
|
- AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
- AWS_REGION={{ .Env.AWS_REGION }}
|
||||||
|
- name: publish-latest-major-minor
|
||||||
|
cmd: sh -c "echo {{ .Version }} | aws s3 cp - s3://dagger-io/dagger/versions/{{ .Major }}.{{ .Minor }}"
|
||||||
|
env:
|
||||||
|
- PATH={{ .Env.PATH }}
|
||||||
|
- AWS_EC2_METADATA_DISABLED=true
|
||||||
|
- AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }}
|
||||||
|
- AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
- AWS_REGION={{ .Env.AWS_REGION }}
|
||||||
|
Reference in New Issue
Block a user