Publish to Lit #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to Lit | |
| on: workflow_dispatch | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y curl | |
| sudo apt install -y openssl | |
| - name: Set up lit, luvi, luvit | |
| run: | | |
| curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | sh | |
| sudo mv lit /usr/local/bin/ | |
| sudo mv luvi /usr/local/bin/ | |
| sudo mv luvit /usr/local/bin/ | |
| - name: Set up private key for Lit | |
| env: | |
| LIT_PRIVATE_KEY: ${{ secrets.LIT_PRIVATE_KEY }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "$LIT_PRIVATE_KEY" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| - name: Authenticate Lit | |
| run: | | |
| lit auth "Richy-Z" "Richard Ziupsnys" "hello@richy.lol" | |
| - name: Add and Publish each package to Lit | |
| run: | | |
| for file in src/*.lua; do | |
| lit add "$file" | |
| lit publish "$file" || echo "skipping $file (lit exited with error code - no changes or already published)" | |
| done |