name: release on: push: branches: - main permissions: contents: write env: APP_TOKEN: ${{ secrets.APP_TOKEN }} jobs: release: name: Release runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Build aios run: | docker run --rm --privileged \ -v ${{ github.workspace }}:/work -w /work \ archlinux:latest \ bash -c "pacman -Sy --noconfirm arch-install-scripts zsh && zsh ./build.zsh" - name: Push to GitHub Container Registry run: | tar -C ./root.x86_64 -c . | docker import - syui/aios echo "${{ env.APP_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin docker tag syui/aios ghcr.io/syui/aios docker push ghcr.io/syui/aios - name: Create new release env: GH_TOKEN: ${{ env.APP_TOKEN }} run: | gh release delete latest --yes --cleanup-tag || true git tag -f latest git push -f origin latest gh release create latest aios.tar.gz --title "latest" --notes "build $(date +%Y.%m.%d)"