diff --git a/README.md b/README.md index 8521c4d..9478398 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,19 @@ rcpr short description % go install github.com/Songmu/rcpr/cmd/rcpr@latest ``` +## GitHub Actions + +Action Songmu/rcpr@main installs rcpr binary for Linux into /usr/local/bin and run it. + +```yaml +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: Songmu/rcpr@main +``` + ## Author [Songmu](https://github.com/Songmu) diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..c2f4e9d --- /dev/null +++ b/action.yml @@ -0,0 +1,20 @@ +name: rcpr +description: install and run the rcpr +inputs: + version: + description: "A version to install rcpr" + required: false + default: "v0.0.12" +runs: + using: "composite" + steps: + - run: | + DIRNAME=rcpr_${{ inputs.version }}_linux_amd64 + cd /tmp + curl -sLO https://github.com/Songmu/rcpr/releases/download/${{ inputs.version }}/${DIRNAME}.tar.gz + tar zxvf ${DIRNAME}.tar.gz + sudo mv ${DIRNAME}/rcpr /usr/local/bin/rcpr + rm -rf ${DIRNAME} ${DIRNAME}.zip + cd - + rcpr + shell: bash