From 4c9065873d48f1da015be8e405cfcd5da8733d23 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 7 Feb 2024 12:14:44 -0500 Subject: [PATCH] Publish installer (#11) --- .github/workflows/cd.installer.yml | 27 ++++++++++++++++++++++++ .github/workflows/{deploy.yml => cd.yml} | 0 README.md | 18 ++++++++++------ 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/cd.installer.yml rename .github/workflows/{deploy.yml => cd.yml} (100%) diff --git a/.github/workflows/cd.installer.yml b/.github/workflows/cd.installer.yml new file mode 100644 index 0000000..0752049 --- /dev/null +++ b/.github/workflows/cd.installer.yml @@ -0,0 +1,27 @@ +on: + pull_request: + paths: + - .github/workflows/cd.installer.yml + push: + branches: main + paths: + - installer.sh + - .github/workflows/cd.installer.yml + +jobs: + cd: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-2 + + - run: aws s3 cp ./installer.sh s3://${{ secrets.AWS_S3_BUCKET }}/installer.sh + + - run: aws cloudfront create-invalidation + --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} + --paths / /installer.sh diff --git a/.github/workflows/deploy.yml b/.github/workflows/cd.yml similarity index 100% rename from .github/workflows/deploy.yml rename to .github/workflows/cd.yml diff --git a/README.md b/README.md index 1724156..2caf725 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,17 @@ $ mash ai chat --help # or https://mash.pkgx.sh/ai/chat/ ## Installing `mash` -`mash` uses `pkgx` for packaging primitives so you may as well use `pkgx` to -run `mash`: +To install `mash` and `pkgx`: ```sh +curl https://mash.pkgx.sh | sh +# ^^ installs /usr/local/bin/mash and /usr/local/bin/pkgx +``` + +If you prefer, you can run `mash` via `pkgx`: + +```sh +$ brew install pkgxdev/made/pkgx # or curl https://pkgx.sh | sh $ pkgx mash # or install it via pkgx: @@ -211,12 +218,11 @@ $ bash ./stargazer # ^^ they will need to read the script to determine deps and interpreter ``` -Hackers can use your script without installing `pkgx` first via our cURL -one-liner. This executes the script but doesn’t install pkgx or any other -pkgs: +Hackers can use your script without installing `pkgx` or `mash` first via our +cURL one-liner. This executes the script but doesn’t install anything: ```sh -sh <(curl https://pkgx.sh) mash your-script-name +sh <(curl https://mash.pkgx.sh) ```