diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0dfcfab --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,45 @@ +on: + push: + tags: + - 'v*' + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: macos-14 + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Changes in this Release + - First Change + - Second Change + draft: true + prerelease: false + - name: Build + run: sh scripts/package_dmg.sh + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./dist/lock.dmg + asset_name: lock.dmg + asset_content_type: application/octet-stream + - name: Publish release + uses: StuYarrow/publish-release@v1.1.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + id: ${{ steps.create_release.outputs.id }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..3e218f4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Run Tests + +on: push + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v4 + id: cache + with: + path: ./shellcheck-latest + key: ${{ runner.os }}-shellcheck + + - name: Install shellcheck + if: steps.cache.outputs.cache-hit != 'true' + run: sh ./scripts/install_shellcheck.sh + + - name: Execute shellcheck + run: ./shellcheck-latest/shellcheck Lock.app/Contents/MacOS/main.command scripts/* + + - name: Save to cache + if: steps.cache.outputs.cache-hit != 'true' + id: cache-save + uses: actions/cache/save@v4 + with: + path: ./shellcheck-latest + key: ${{ steps.cache.outputs.cache-primary-key }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c0a51fa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -os: osx -cache: - directories: - - $HOME/shellcheck-latest -before_install: - - sh scripts/install_shellcheck.sh -script: - - ./shellcheck-latest/shellcheck Lock.app/Contents/MacOS/main.command scripts/* -before_deploy: sh scripts/package_dmg.sh -deploy: - provider: releases - api_key: - secure: qUy1jdKoRenMr1Goe5KcqueiPA8+Y5kXGn4TInqB9OKdcA97IYA7VVXpl3GOn8R4azwnaN+qAbpqM/+E0+eHUC+YvaSux1O5XR8qxzGKjdLukshjlNHNDmyhBUNrbAPWwcOZ/HflEieOhat0XSmPU/14g4W9UUfOiINVbdThEfCmOXmtmegyXmbfisj1Zwsua5Qp85+S39mP4+ND6rOv66IzmmAkk7CsEmwk+GJOUVPxICrVXH0ZRvr9/8YxPu+5cGr+BBKNuTZdSm7dbl/eOLVmyv0qSjMW3SJ6ct5S8yf0gWPgtKcIiQBscACJPfHxMoMfTn4byr4XIiqFO6rUuTwContjGaf6a7dTnCnYv2G4tT+BHk8ik4lxqtgVeLeftQtd8/73YN3PhLeG6NNYpCXdRhKU7cyhkg5W2TUdKj9wzHb4fQ/4xhe6gfaSSlvNPoM6z143A5SP3P5M2Z9DJDmYau6by3O6OB0VjLtnMtShC02SFwPNjmSlPb13zuKp7+tlz7ZKQYiIM3Uo1pL56gw+0vn96mcAk2vIk1cOtKcLB+PCLI27nencCg7mirVf01AN6GFA72dAig3EOUNq8SWUjsgtkNl+3PnQHLixiuj1f0BUevoRofCRu43EUVHKtgl7ZxaQ6/lAxlVnreglZpqkEwyCs0aXOj1GGVsAEhQ= - file: dist/lock.dmg - skip_cleanup: true - on: - tags: true