File tree Expand file tree Collapse file tree 6 files changed +75
-12
lines changed
Expand file tree Collapse file tree 6 files changed +75
-12
lines changed Original file line number Diff line number Diff line change 1+ name : cd·installer
2+
13on :
24 pull_request :
35 paths :
1012
1113jobs :
1214 cd :
15+ if : github.repository == 'pkgxdev/mash'
1316 runs-on : ubuntu-latest
1417 steps :
1518 - uses : actions/checkout@v4
2528 - run : aws cloudfront create-invalidation
2629 --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
2730 --paths / /installer.sh
31+
32+ test :
33+ needs : cd
34+ runs-on : ubuntu-latest
35+ steps :
36+ - run : curl -L mash.pkgx.sh | sh
37+ - run : mash demo test-pattern
Original file line number Diff line number Diff line change 1+ name : cd·www
2+
13on :
24 push :
35 branches : main
3436 mkdir out
3537 .github/scripts/index.ts --input ./build > ./out/index.json
3638
39+ -
uses :
robinraju/[email protected] 40+ with :
41+ latest : true
42+ fileName : mash-*.sh
43+
44+ - run : mv mash-*.sh ./out/mash.sh
45+
3746 - name : build
3847 run : .github/scripts/build.ts --input ./build --output ./out --index-json ./out/index.json
3948
Original file line number Diff line number Diff line change 1+ name : cd·vx
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+
8+ concurrency :
9+ group : cd/vx/${{ github.event.release.tag_name }}
10+ cancel-in-progress : true
11+
12+ permissions :
13+ contents : write
14+
15+ jobs :
16+ retag :
17+ if : github.repository == 'pkgxdev/mash'
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+ - uses : fischerscode/tagger@v0
22+ with :
23+ prefix : v
24+ - run : |
25+ git tag -f latest
26+ git push origin latest --force
27+
28+ attach :
29+ if : github.repository == 'pkgxdev/mash'
30+ runs-on : ubuntu-latest
31+ steps :
32+ - uses : actions/checkout@v4
33+
34+ - name : version
35+ run : sed -i "s/mash 0.0.0-dev/mash ${{ github.event.release.tag_name }}/g" ./mash
36+
37+ - name : prep
38+ run : |
39+ mkdir out
40+ mv ./mash ./out/mash-${{ github.event.release.tag_name }}.sh
41+
42+ - name : attach
43+ run : gh release upload ${{ github.event.release.tag_name }} ./out/mash-${{ github.event.release.tag_name }}.sh
44+ env :
45+ GH_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change 1+ name : ci
2+
13on :
24 pull_request :
35 paths : mash
46
57jobs :
68 test :
9+ if : github.repository == 'pkgxdev/mash'
710 runs-on : ubuntu-latest
811 steps :
912 - uses : actions/checkout@v4
Original file line number Diff line number Diff line change 2626if [ $# -gt 0 ]; then
2727 exec pkgx +pkgx.sh/mash -- mash " $@ "
2828else
29- pkgx install mash
30-
31- if [ -f /usr/bin/which ]; then
32- pkgxd=" $( dirname " $( which pkgx) " ) "
33-
34- if [ ! -w " $pkgxd " ]; then
35- SUDO=sudo
36- fi
37-
38- $SUDO mv $HOME /.local/bin/mash " $pkgxd "
39- fi
40-
29+ tmp=" $( mktemp) "
30+ curl -Ssf https://pkgxdev.github.io/mash/mash.sh > $tmp
31+ sudo install -m 0755 " $tmp " /usr/local/bin/mash
4132 echo " now type: mash" 1>&2
4233fi
Original file line number Diff line number Diff line change 22
33set -eo pipefail
44
5+ if [ " $1 " == --version ]; then
6+ echo " mash 0.0.0-dev"
7+ exit 0
8+ fi
9+
510if [ -n " $RUNNER_DEBUG " -a -n " $GITHUB_ACTIONS " ] || [ -n " $VERBOSE " ]; then
611 set -x
712fi
You can’t perform that action at this time.
0 commit comments