From 1c7aa7812c8d20e0b4b1f62716a3a9d24a81d3ce Mon Sep 17 00:00:00 2001 From: Matt Knight Date: Sun, 3 Mar 2024 15:42:33 -0800 Subject: [PATCH] update deploy actions --- .github/workflows/deploy.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e2a30df..be9b72e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,17 +1,20 @@ name: Continuous Deployment -env: - # Specify the current Zig version MicroZig uses: - ZIG_VERSION: 0.11.0 +permissions: + contents: write on: push: - branches: [main] + tags: + - "microzig-*.*.*" jobs: deploy-packages: runs-on: ubuntu-latest steps: + - name: Extract tag name + run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + - name: Checkout uses: actions/checkout@v4 with: @@ -21,24 +24,21 @@ jobs: - name: Setup Zig uses: goto-bus-stop/setup-zig@v2 with: - version: ${{ env.ZIG_VERSION }} + version: master - - name: Install PIP packages - run: | - pip install -r tools/requirements.txt + - name: Assemble Packages + run: zig build package -- "${{ secrets.DOWNLOADS_URL }}" - - name: Generate and validate packages - run: | - ./tools/bundle.py --base-url "${{ secrets.DOWNLOADS_URL }}" + # TODO: Validation - name: Deploy uses: easingthemes/ssh-deploy@main with: SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }} ARGS: "-vzrli" - SOURCE: "microzig-deploy/" + SOURCE: "boxzer-out/${{ env.TAG_NAME }}/" REMOTE_HOST: ${{ secrets.DEPLOY_HOST }} REMOTE_USER: ${{ secrets.DEPLOY_USER }} REMOTE_PORT: ${{ secrets.DEPLOY_PORT }} TARGET: "." - \ No newline at end of file +