add payload weights to state saving (#52) #18
Workflow file for this run
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: | |
push: | |
tags: | |
- "*.*.*" | |
defaults: | |
run: | |
working-directory: c182rg-improvement-project | |
permissions: | |
id-token: write | |
contents: write | |
jobs: | |
build-and-deploy: | |
runs-on: windows-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v2 | |
- name: verify manifest version | |
run: npm run verify-manifest-version | |
- name: set up node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- name: install dependencies | |
run: npm ci | |
- name: build code | |
run: npm run build | |
- name: include docs | |
run: Copy-Item -Path docs\README.txt -Destination README.txt | |
- name: rename build folder | |
run: Rename-Item -Path build -NewName c182rg-improvement-project | |
- name: package code | |
run: Compress-Archive -Path c182rg-improvement-project -DestinationPath c182rg-improvement-project.zip | |
- name: package docs | |
run: Compress-Archive -Path README.txt -Update -DestinationPath c182rg-improvement-project.zip | |
- name: assume-github-actions-role | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.PROJECTS_BUCKET_LIVE_UPLOAD_ROLE_ARN }} | |
aws-region: eu-west-1 | |
- name: deploy | |
run: aws s3 cp c182rg-improvement-project.zip "s3://projects-live-bucket-bucket-x5u4945s2wzh/c182rg-improvement-project/$env:GITHUB_REF_NAME/c182rg-improvement-project.zip" --cache-control max-age=31536000 |