Add permissions to the job. #7
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 Artifacts | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
#env: | |
#BUCKET: ${{ vars.RELEASE_BUCKET }} | |
#RELEASES_CLOUDFRONT_ID: ${{ vars.RELEASES_CLOUDFRONT_ID }} | |
jobs: | |
release-artifacts: | |
#if: ${{ false }} | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Cache yarn dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Cache cargo dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Set env | |
run: | | |
VERSION=$(node -e 'console.log(require("./package.json").version)'); | |
echo "RELEASE_VERSION=$VERSION" >> "$GITHUB_ENV" | |
- name: Enable corepack | |
run: corepack enable | |
- name: Install wasm-pack | |
run: cargo install wasm-pack | |
- name: Compile webassembly bindings | |
run: cd sdk/bindings && wasm-pack build --target web --scope mpc-sdk | |
- name: Install dependencies | |
run: yarn install | |
- name: Check types | |
run: yarn types | |
- name: Build snap package archive | |
run: npm pack | |
- name: Build website | |
run: yarn build | |
- name: Compress website | |
run: zip -r website-${RELEASE_VERSION}.zip dist | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
generate_release_notes: true | |
files: | | |
mpc-sdk-multi-factor-accounts-${{ env.RELEASE_VERSION }}.tgz | |
website-${{ env.RELEASE_VERSION }}.zip |