forked from telia-oss/sidecred
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.18 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: release
on:
push:
tags:
- 'v*'
jobs:
build:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Install Go
uses: actions/setup-go@v2
with: { go-version: 1.17 }
- name: Release
uses: goreleaser/goreleaser-action@v2
with: { version: v1.3.1, args: release --rm-dist }
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get version
id: version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Upload Lambda
run: |
aws s3 cp "dist/sidecred-lambda-${VERSION}-linux-amd64.zip" "s3://telia-oss/sidecred-lambda/v${VERSION}.zip" --acl public-read
env:
VERSION: ${{ steps.version.outputs.VERSION }}
AWS_ACCESS_KEY_ID: ${{ secrets.CONTRIBUTORS_TELIA_COMMON_OPENSOURCE_PROD_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CONTRIBUTORS_TELIA_COMMON_OPENSOURCE_PROD_SECRET_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.CONTRIBUTORS_TELIA_COMMON_OPENSOURCE_PROD_SESSION_TOKEN }}
AWS_REGION: "eu-west-1"