Skip to content

Merge pull request #35 from fermyon/skippable-tests #34

Merge pull request #35 from fermyon/skippable-tests

Merge pull request #35 from fermyon/skippable-tests #34

Workflow file for this run

name: Create and Upload Release
on:
push:
branches:
- main
tags:
- "tests-v*"
env:
CARGO_TERM_COLOR: always
RUST_VERSION: "1.80"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
shell: bash
run: |
rustup toolchain install ${{ env.RUST_VERSION }} --component rustfmt
rustup default ${{ env.RUST_VERSION }}
- name: Install Wasm Rust target
run: rustup target add wasm32-wasi && rustup target add wasm32-unknown-unknown
- name: Create archive
run: cargo run -- archive
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: tests
path: tests.tar.gz
- name: set the release version (tag)
if: startsWith(github.ref, 'refs/tags/tests-v')
shell: bash
run: |
RELEASE_VERSION=$(echo ${{ github.ref_name }} | cut -c 7-)
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
echo "RELEASE_NOTE=The $RELEASE_VERSION release of the conformance tests." >> $GITHUB_ENV
- name: set the release version (main)
if: github.ref == 'refs/heads/main'
shell: bash
run: |
echo "RELEASE_VERSION=canary" >> $GITHUB_ENV
echo "RELEASE_NOTE=This is a "canary" release of the most recent commits on our main branch. Canary is **not stable**." >> $GITHUB_ENV
- name: Recreate canary release
uses: ncipollo/[email protected]
with:
tag: "${{ env.RELEASE_VERSION }}"
allowUpdates: true
prerelease: ${{ env.RELEASE_VERSION == 'canary' }}
artifacts: "tests.tar.gz"
commit: ${{ github.sha }}
body: "${{ env.RELEASE_NOTE }}"