Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpeapsUnterstrichHD committed Sep 4, 2024
1 parent 996c858 commit e00ff18
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
61 changes: 28 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,70 @@
name: Build, Release, and Submit to Homebrew
name: Genp - Build, Release, and Submit to Homebrew (with a twist!)

permissions:
contents: write

on:
push:
tags:
- 'v*.*.*' # Trigger on tags that match this pattern, e.g., v1.0.0
- 'v*.*.*'

jobs:
# Step 1: Create the release

create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Extract version from Cargo.toml
id: extract_version
run: |
version=$(grep '^version = ' Cargo.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$version" >> $GITHUB_ENV
- id: create-release
uses: taiki-e/create-gh-release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Genp v${{ env.version }} - Unlocking the Password Vault!
changelog: |
Hey there, folks! It's time to unleash the power of Genp v${{ env.version }} - the ultimate CLI tool for generating secure passwords and PINs that'll keep your data safer than a bank vault.
With this release, we've added some extra spice to make things even more fun. Who needs boring old passwords when you can have funky fresh ones straight from the Genp factory?
So, what are you waiting for? Grab your copy and start generating passwords that'll make your friends go "Whoa, how'd you come up with that?" 🎉
# Step 2: Upload assets to the release
upload-assets:
needs: create-release
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
os-name: linux
arch: x86_64
- target: universal-apple-darwin
os: macos-latest
os-name: macos
arch: universal
- target: x86_64-pc-windows-msvc
os: windows-latest
os-name: windows
arch: x86_64
- target: aarch64-pc-windows-msvc
os: windows-latest
os-name: windows
arch: aarch64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: genp # Replace with your actual binary name(s)
target: ${{ matrix.target }}
tar: unix # Change as needed based on distribution preference
zip: windows # Change as needed based on distribution preference
token: ${{ secrets.GITHUB_TOKEN }}

# Step 3: Submit to Homebrew
submit-formula:
needs: upload-assets
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Extract version from Cargo.toml
id: extract_version
run: |
version=$(grep '^version = ' Cargo.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$version" >> $GITHUB_ENV
- name: Submit to Homebrew
run: |
brew install -v --build-from-source --HEAD homebrew/core/genp
brew create https://github.com/comboomPunkTsucht/genp/releases/download/${{ github.ref_name }}/genp-universal-apple-darwin.tar.gz --version=${{ env.version }}
brew create https://github.com/comboomPunkTsucht/genp/releases/download/${{ github.ref_name }}/genp-x86_64-unknown-linux-gnu.tar.gz --version=${{ env.version }}
brew install --interactive homebrew/core/genp
brew audit --strict homebrew/core/genp
brew pr-upload
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: genp
target: ${{ matrix.target }}
tar: unix
zip: windows
archive: genp-v${{ env.version }}-${{ matrix.os-name }}-${{ matrix.arch }}
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "genp"
version = "1.0.8"
version = "1.0.9"
description = "A simple Generator for PINs and Passwords"
authors = ["comboom.sucht","mcpeaps_HD"]
edition = "2021"
Expand Down

0 comments on commit e00ff18

Please sign in to comment.