Skip to content

Commit

Permalink
Use nix for elm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rm committed Mar 23, 2024
1 parent 68e131c commit 9eb642e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,21 @@ jobs:
test-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- run: git config --global user.name "Andrey Kuzmin"
- run: git config --global user.email "[email protected]"

- uses: actions/setup-node@v1
with:
node-version: "12"
- run: git config --global user.email "[email protected]"

- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
path: |
~/.npm
~/.elm
key: ${{ runner.os }}-cache

- run: npm install -g [email protected] [email protected] [email protected] [email protected]

- run: elm-format --validate .

- run: elm-review

- run: elm-test
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix develop --command elm-format --validate .
- run: nix develop --command elm-review
- run: nix develop --command elm-test

- run: ./scripts/elm-publish.sh ${{ github.event.inputs.version }}
- run: nix develop --command ./scripts/elm-publish.sh ${{ github.event.inputs.version }}

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: gh-pages
ref: gh-pages
- run: ./scripts/gh-pages.sh ${{ github.event.inputs.version }}
- run: nix develop --command ./scripts/gh-pages.sh ${{ github.event.inputs.version }}
2 changes: 1 addition & 1 deletion scripts/elm-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ git commit -m "Bump to $version"
git push
last_commit=$(git rev-parse HEAD)

git rm -rf --ignore-unmatch .github benchmarks examples scripts tests elm-physics.gif flake.nix
git rm -rf --ignore-unmatch .github benchmarks examples scripts tests elm-physics.gif flake.nix flake.lock
sed -i.bak "s+https://unsoundscapes.com/elm-physics/+https://unsoundscapes.com/elm-physics/$version/+g" README.md
sed -i.bak "s+https://github.com/w0rm/elm-physics/tree/main/+https://github.com/w0rm/elm-physics/tree/$last_commit/+g" README.md
rm README.md.bak
Expand Down

0 comments on commit 9eb642e

Please sign in to comment.