-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.44 KB
/
awstools.yml
File metadata and controls
52 lines (42 loc) · 1.44 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: awstools
on:
workflow_dispatch:
push:
branches:
- master
paths:
- '.github/workflows/awstools.yml'
jobs:
tools-nuget:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '9.0' ]
env:
working-directory: ./BrowserDemo/CshtmlDemo
bucketname: osim-onecloud-cdn-devtest
keyprefix: uploaddemo
localpath: ./bin/Release/net9.0/publish/wwwroot
steps:
- uses: actions/checkout@v6
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ matrix.dotnet-version }}
include-prerelease: true
- name: Install dependencies
run: dotnet publish -c Release
working-directory: ${{env.working-directory}}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_SECRET }}
aws-region: ${{ secrets.AWS_REGION }}
- name: delete
run: aws s3 rm ${{ secrets.S3PATH }}demo/ --recursive
- name: publish
run: aws s3 sync ${{env.localpath}} ${{ secrets.S3PATH }}demo/ --acl private
working-directory: ${{env.working-directory}}
- name: cnd invalidation
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CDN_ID }} --paths "/demo/*"