Skip to content

Commit

Permalink
Replace TypeScript hell with simple Bash script 🎉
Browse files Browse the repository at this point in the history
Inspired by #34
  • Loading branch information
hecrj committed Sep 4, 2023
1 parent 50a120e commit 667d502
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 855 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/integration.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
name: Integration
name: Test
on:
push: {}
push:
branches: '*'
schedule:
- cron: '0 0 * * *'
jobs:
test:
setup:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable, nightly]
include:
- os: macOS-latest
rust: 'stable'
components: 'rustfmt, clippy'
targets: 'x86_64-apple-darwin'
rust: stable
components: rustfmt, clippy
targets: x86_64-apple-darwin
- os: windows-latest
rust: 'stable'
components: 'rustfmt, clippy'
targets: 'x86_64-pc-windows-msvc'
rust: stable
components: rustfmt, clippy
targets: x86_64-pc-windows-msvc
- os: ubuntu-latest
rust: 'stable'
components: 'rustfmt, clippy'
targets: 'x86_64-unknown-linux-musl'
rust: stable
components: rustfmt, clippy
targets: x86_64-unknown-linux-musl
steps:
- uses: hecrj/setup-rust-action@master
- uses: hecrj/setup-rust-action@use-bash
with:
rust-version: ${{ matrix.rust }}
components: ${{ matrix.components || '' }}
targets: ${{ matrix.targets || '' }}
- name: Check Cargo availability
- name: Check cargo availability
run: cargo --version
- name: Check Rustup default toolchain
- name: Check rustup default toolchain
run: rustup default | grep '${{ matrix.rust }}'
- name: Check rustfmt and clippy are available on MacOS
if: matrix.os == 'macOS-latest' && matrix.rust == 'stable'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
rust: [stable, nightly]

steps:
- uses: hecrj/setup-rust-action@v1
- uses: hecrj/setup-rust-action@v2
with:
rust-version: ${{ matrix.rust }}
- uses: actions/checkout@master
Expand Down
35 changes: 21 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
name: 'Set up a Rust toolchain'
description: 'Install a specific Rust toolchain and add it to the PATH'
author: 'Héctor Ramón'
name: Set up a Rust toolchain
description: Install a specific Rust toolchain and add it to the PATH
author: Héctor Ramón Jiménez <hector@hecrj.dev>
branding:
icon: package
color: blue
inputs:
rust-version:
description: 'The toolchain name, such as stable, nightly, or 1.8.0'
default: 'stable'
description: The toolchain version; such as stable, nightly, or 1.8.0
default: stable
components:
description: 'The toolchain components to install, comma-separated'
default: ''
description: The toolchain components to install, comma-separated
default: ""
targets:
description: 'The toolchain targets to add, comma-separated'
default: ''
description: The toolchain targets to add, comma-separated
default: ""
runs:
using: 'node16'
main: 'dist/index.js'
branding:
icon: 'download'
color: 'blue'
using: composite
steps:
- id: setup
run: '"${GITHUB_ACTION_PATH%/}/setup.sh"'
shell: bash
env:
INPUT_RUST_VERSION: ${{ inputs.rust-version }}
INPUT_COMPONENTS: ${{ inputs.components }}
INPUT_TARGETS: ${{ inputs.targets }}
1 change: 0 additions & 1 deletion dist/index.js

This file was deleted.

Binary file removed dist/unzip
Binary file not shown.
File renamed without changes.
Loading

0 comments on commit 667d502

Please sign in to comment.