Bump version to 2.0.0-beta.3 #6
Workflow file for this run
This file contains hidden or 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: | |
| - 'v*' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-cli: | |
| name: Build CLI - ${{ matrix.target }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| runner: macos-latest | |
| os: macos | |
| archive: tar.gz | |
| - target: aarch64-apple-darwin | |
| runner: macos-latest | |
| os: macos | |
| archive: tar.gz | |
| - target: x86_64-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| os: linux | |
| archive: tar.gz | |
| - target: aarch64-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| os: linux | |
| use_cross: true | |
| archive: tar.gz | |
| - target: x86_64-pc-windows-msvc | |
| runner: windows-latest | |
| os: windows | |
| archive: zip | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross | |
| if: matrix.use_cross | |
| run: cargo install cross --locked | |
| - name: Build CLI | |
| run: | | |
| if [ "${{ matrix.use_cross }}" = "true" ]; then | |
| cross build -p inky-cli --release --target ${{ matrix.target }} | |
| else | |
| cargo build -p inky-cli --release --target ${{ matrix.target }} | |
| fi | |
| shell: bash | |
| - name: Package (unix) | |
| if: matrix.os != 'windows' | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| tar czf ../../../inky-${{ matrix.target }}.tar.gz inky | |
| shell: bash | |
| - name: Package (windows) | |
| if: matrix.os == 'windows' | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| 7z a ../../../inky-${{ matrix.target }}.zip inky.exe | |
| shell: bash | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: cli-${{ matrix.target }} | |
| path: inky-${{ matrix.target }}.${{ matrix.archive }} | |
| build-ffi: | |
| name: Build FFI - ${{ matrix.target }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| runner: macos-latest | |
| os: macos | |
| lib_name: libinky.dylib | |
| - target: aarch64-apple-darwin | |
| runner: macos-latest | |
| os: macos | |
| lib_name: libinky.dylib | |
| - target: x86_64-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| os: linux | |
| lib_name: libinky.so | |
| - target: aarch64-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| os: linux | |
| lib_name: libinky.so | |
| use_cross: true | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross | |
| if: matrix.use_cross | |
| run: cargo install cross --locked | |
| - name: Build FFI | |
| run: | | |
| if [ "${{ matrix.use_cross }}" = "true" ]; then | |
| cross build -p inky-ffi --release --target ${{ matrix.target }} | |
| else | |
| cargo build -p inky-ffi --release --target ${{ matrix.target }} | |
| fi | |
| shell: bash | |
| - name: Package | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| tar czf ../../../libinky-${{ matrix.target }}.tar.gz ${{ matrix.lib_name }} | |
| shell: bash | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ffi-${{ matrix.target }} | |
| path: libinky-${{ matrix.target }}.tar.gz | |
| build-wasm: | |
| name: Build WASM | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Build WASM | |
| run: wasm-pack build crates/inky-wasm --target nodejs --out-dir ../../bindings/node | |
| - name: Package | |
| run: tar czf inky-wasm-nodejs.tar.gz -C bindings node | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: wasm-nodejs | |
| path: inky-wasm-nodejs.tar.gz | |
| release: | |
| name: Create GitHub Release | |
| needs: [build-cli, build-ffi, build-wasm] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| path: artifacts | |
| - name: Collect release assets | |
| run: | | |
| mkdir release | |
| find artifacts -type f \( -name '*.tar.gz' -o -name '*.zip' \) -exec cp {} release/ \; | |
| cd release | |
| sha256sum * > SHA256SUMS.txt | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: ${{ github.ref_name }} | |
| generate_release_notes: true | |
| files: release/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish-crates: | |
| name: Publish to crates.io | |
| needs: [release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Publish inky-core | |
| run: cargo publish -p inky-core | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Publish inky-cli | |
| run: cargo publish -p inky-cli | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| publish-npm: | |
| name: Publish to npm | |
| needs: [release] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/setup-node@v5 | |
| with: | |
| registry-url: https://registry.npmjs.org | |
| - name: Download WASM artifact | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: wasm-nodejs | |
| path: . | |
| - name: Extract and publish | |
| run: | | |
| tar xzf inky-wasm-nodejs.tar.gz | |
| cd node | |
| VERSION=$(node -p "require('./package.json').version") | |
| if echo "$VERSION" | grep -qE '(alpha|beta|rc|dev)'; then | |
| npm publish --access public --tag beta --provenance | |
| else | |
| npm publish --access public --provenance | |
| fi | |
| publish-pypi: | |
| name: Publish to PyPI | |
| needs: [release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Build and publish | |
| run: | | |
| pip install build twine | |
| cd bindings/python | |
| python -m build | |
| twine upload dist/* | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
| publish-rubygems: | |
| name: Publish to RubyGems | |
| needs: [release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| - name: Build and publish | |
| run: | | |
| cd bindings/ruby | |
| gem build inky-email.gemspec | |
| GEM_FILE=$(ls inky-email-*.gem | head -1) | |
| gem push "$GEM_FILE" | |
| env: | |
| GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} |