diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..d7fe5fb --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Install dependencies + run: pnpm install + + - name: Build project + run: pnpm run build + + - name: Check project + run: pnpm run check diff --git a/.gitea/workflows/deploy.yml b/.forgejo/workflows/deploy.yml similarity index 80% rename from .gitea/workflows/deploy.yml rename to .forgejo/workflows/deploy.yml index 35dd95a..37804bb 100644 --- a/.gitea/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -3,8 +3,6 @@ name: Deploy on: workflow_dispatch: -runs-on: selfhost - jobs: deploy: runs-on: selfhost @@ -13,8 +11,8 @@ jobs: - name: get artifact run: | curl --user minijack:${{ secrets.PACKAGE_TOKEN }} \ - https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz > build.tar.gz - echo https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz + https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ forgejo.ref }}/build-${{ forgejo.ref }}.tar.gz > build.tar.gz + echo https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ forgejo.ref }}/build-${{ forgejo.ref }}.tar.gz - name: extract artifact run: | tar -xvzf build.tar.gz diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml deleted file mode 100644 index 57aaba1..0000000 --- a/.gitea/workflows/build.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Build -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup pnpm - uses: https://github.com/pnpm/action-setup@v4 - with: - version: 9 - run_install: false - - - name: Setup node - uses: https://github.com/actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - name: Install dependencies - run: pnpm install - - - name: Build projects - run: pnpm run build - - - name: Run checks - run: pnpm run check - - - name: Upload artifacts - run: | - tar -czf build.tar.gz build - curl --user minijack:${{ secrets.PACKAGE_TOKEN }} \ - --upload-file build.tar.gz \ - https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz - echo https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz