Skip to content

Commit

Permalink
Add release and publish workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMili committed Jun 4, 2024
1 parent 634d1ec commit 6181da6
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 9 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
workflow_dispatch:
release:
types:
- created

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Github actions init
uses: actions/checkout@v4
with:
# To force fetching tags
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install build dependencies
run: pip install build

- name: Build distribution
run: python -m build

- name: Publish
uses: pypa/[email protected]
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Github actions init
uses: actions/checkout@v4
with:
# To force fetching tags
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install build dependencies
run: pip install build

- name: Build
run: python -m build

- name: Read VERSION file
id: getversion
run: echo "version=$(cat src/whatinstalled/VERSION.md)" >> $GITHUB_OUTPUT

- name: Changelog
run: git log $(git describe --tags --abbrev=0)..HEAD --format="%s %h" > LATEST-CHANGES.md

- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/whatinstalled-${{ steps.getversion.outputs.version }}-py3-none-any.whl
dist/whatinstalled-${{ steps.getversion.outputs.version }}.tar.gz
tag_name: v${{ steps.getversion.outputs.version }}
body_path: LATEST-CHANGES.md
token: ${{ secrets.PAT_WHATINSTALLED }}
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**WhatInstalled** is a tool to list all packages you ever installed on your machine.
**WhatInstalled** is a tool to list all packages ever installed on your machine.
Currently these package manager are handled:
- Homebrew
- Macport
Expand Down Expand Up @@ -38,12 +38,13 @@ pip install -e .
$ whatinstalled --help
Usage: main.py [OPTIONS]

╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --profile TEXT Select a given profile among this list: lua,mac,node,python,ruby [default: None] │
│ --include-system --no-include-system Include system packages [default: no-include-system] │
│ --exclude TEXT Exclude given installers separated by a comma [default: None] │
│ --json --no-json Output to JSON [default: no-json] │
│ --csv --no-csv Output to CSV [default: no-csv] │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --profile TEXT Select a given profile among this list: lua,mac,node,python,ruby [default: None] │
│ --include-system --no-include-system Include system packages [default: no-include-system] │
│ --exclude TEXT Exclude given installers separated by a comma [default: None] │
│ --json --no-json Output to JSON [default: no-json] │
│ --csv --no-csv Output to CSV [default: no-csv] │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

```

0 comments on commit 6181da6

Please sign in to comment.