docs(repo): fix typo by renaming 'master' to 'main' #6
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: | |
pull_request: | |
types: [closed] | |
branches: [main] | |
jobs: | |
build-artifacts: | |
env: | |
archive_name: artifact | |
strategy: | |
fail-fast: false | |
matrix: | |
pkg: [fuel-core-nats] | |
os: [ubuntu-latest] | |
target: [x86_64-unknown-linux-gnu] | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.pkg }} ${{ matrix.target }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: ./.github/actions/setup-rust | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
- name: Install host target | |
run: rustup target add ${{ matrix.target }} | |
- name: Build | |
run: make build TARGET=${{ matrix.target }} PACKAGE=${{ matrix.pkg }} | |
- name: Set Archive Name | |
id: archive | |
run: echo "archive_name=${{ matrix.pkg }}-${{ matrix.target }}" >> $GITHUB_ENV | |
- name: Create Tar Archive | |
run: | | |
mkdir ${{ env.archive_name }} | |
cp target/${{ matrix.target }}/release/${{ matrix.pkg }} ${{ env.archive_name }} | |
tar -czf ${{ env.archive_name }}.tgz ${{ env.archive_name }} | |
- name: Upload Artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.pkg }}-${{ matrix.target }} | |
path: ${{ env.archive_name }}.tgz | |
if-no-files-found: error | |
release: | |
needs: [build-artifacts] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
actions: write | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
path: artifacts | |
merge-multiple: true | |
- name: List artifacts | |
run: ls -R artifacts | |
- uses: knope-dev/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- run: knope release | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} |