diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml new file mode 100644 index 0000000..b5e2a76 --- /dev/null +++ b/.github/workflows/homebrew.yml @@ -0,0 +1,17 @@ +name: Homebrew Bump Formula +on: + release: + types: [published] + workflow_dispatch: +jobs: + homebrew: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Bump Homebrew Formula + uses: dawidd6/action-homebrew-bump-formula@v3 + with: + token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} + tap: AmmarAbouZor/homebrew-tui-journal + formula: tui-journal diff --git a/.github/workflows/release.yml.depricated b/.github/workflows/release.yml.depricated deleted file mode 100644 index c31600c..0000000 --- a/.github/workflows/release.yml.depricated +++ /dev/null @@ -1,86 +0,0 @@ -name: release - -on: - push: - tags: - - "[0-9]+.[0-9]+.[0-9]+" - -jobs: - create-release: - name: create-release - runs-on: ubuntu-latest - outputs: - upload_url: ${{ steps.release.outputs.upload_url }} - app_version: ${{ env.APP_VERSION }} - steps: - - name: Get release version - shell: bash - if: env.APP_VERSION == '' - run: | - echo "APP_VERSION=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV" - echo "App version: ${{ env.APP_VERSION }}" - - - name: Create release - id: release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ env.APP_VERSION }} - release_name: TUI-Journal ${{ env.APP_VERSION }} - body: Please See [CHANGELOG.ron](https://github.com/AmmarAbouZor/tui-journal/blob/main/CHANGELOG.ron) for details. - prerelease: false - - build-release: - name: build-release - needs: ['create-release'] - runs-on: ${{ matrix.os }} - env: - CARGO: cargo - TARGET_DIR: ./target - RUST_BACKTRACE: 1 - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-2022] - target: - - x86_64-unknown-linux-musl - - aarch64-unknown-linux-gnu - - x86_64-apple-darwin - - x86_64-pc-windows-msvc - - steps: - - uses: actions/checkout@v3 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - - - name: Build binaries - run: ${{ env.CARGO }} build --verbose --release --target ${{ matrix.target }} - - - name: Build archive - run: | - staging="tjournal-${{ needs.create-release.outputs.app_version }}-${{ matrix.target }}" - mkdir -p "$staging" - if [ "${{ matrix.os }}" = "windows-2022" ]; then - cp "target/${{ matrix.target }}/release/tjournal.exe" "$staging/" - 7z a -tzip "$staging.zip" "$staging" - echo "ASSET=$staging.zip" >> "$GITHUB_ENV" - else - cp "target/${{ matrix.target }}/release/tjournal" "$staging/" - tar czf "$staging.tar.gz" "$staging" - echo "ASSET=$staging.tar.gz" >> "$GITHUB_ENV" - fi - - - name: Upload release archive - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ${{ env.ASSET }} - asset_name: ${{ env.ASSET }} - asset_content_type: application/octet-stream