Improved the release workflow to pass the corresponding environment v… #9
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 to AWS | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
defaults: | |
run: | |
working-directory: ./ | |
jobs: | |
publish-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
- name: Setup Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: Install Dependencies | |
run: cargo fetch --locked | |
- name: Install Semantic Release | |
run: | | |
npm install --global semantic-release | |
npm install --global @semantic-release/git | |
npm install --global @semantic-release/exec | |
- name: Run semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
run: npx semantic-release |