diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index 4f0a3cfb..00000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Nightly - -on: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: - inputs: - channel: - description: 'release to perform' - required: true - default: 'nightly' - type: choice - options: - - nightly - - date - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - steps: - - uses: actions/checkout@v3 - - uses: udoprog/github-release@channel - id: release - with: - channel: ${{github.event.inputs.channel}} - - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v2 - - run: cargo run -p builder -- --channel ${{steps.release.outputs.channel}} - - uses: actions/upload-artifact@v3 - with: - name: dist-${{matrix.os}} - path: dist - - publish: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: udoprog/github-release@channel - id: release - with: - channel: ${{github.event.inputs.channel}} - - uses: actions/download-artifact@v3 - with: {name: dist-macos-latest, path: dist} - - uses: actions/download-artifact@v3 - with: {name: dist-windows-latest, path: dist} - - uses: actions/download-artifact@v3 - with: {name: dist-ubuntu-latest, path: dist} - - uses: udoprog/github-release@v1 - with: - files: "dist/*" - name: ${{steps.release.outputs.channel}} - token: ${{secrets.GITHUB_TOKEN}} - prerelease: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba28179e..4d601e49 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,24 @@ name: Release on: + workflow_dispatch: + inputs: + version: + description: 'Version to release' + required: true + default: 'nightly' + type: choice + options: + - nightly + - "%date" push: tags: - '*' +env: + KICK_VERSION: "${{github.event.inputs.version}} || %{github.tag} || nightly" + RUST_LOG: kick=trace + jobs: build: runs-on: ${{matrix.os}} @@ -16,9 +30,10 @@ jobs: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - - uses: udoprog/github-release@tag + - uses: udoprog/kick@nightly + - run: kick define --github-action id: release - - run: cargo run -p builder -- --version ${{steps.release.outputs.tag}} + - run: cargo run -p builder -- --version ${{steps.release.outputs.version}} - uses: actions/upload-artifact@v3 with: name: dist-${{matrix.os}} @@ -37,9 +52,7 @@ jobs: with: {name: dist-windows-latest, path: dist} - uses: actions/download-artifact@v3 with: {name: dist-ubuntu-latest, path: dist} - - uses: udoprog/github-release@v1 - with: - files: "dist/*" - name: ${{steps.release.outputs.tag}} - token: ${{secrets.GITHUB_TOKEN}} - prerelease: ${{steps.release.outputs.prerelease}} + - uses: udoprog/kick@nightly + - run: kick github-release --upload "dist/*" --github-action + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}