cleanup #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: userChrome.css update | |
on: | |
push: | |
paths: | |
- "userChrome.css" | |
workflow_dispatch: | |
jobs: | |
create_pre_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Calculate Diff | |
id: diff | |
run: | | |
if [ $(git rev-parse --is-shallow-repository) = true ]; then | |
git fetch --unshallow | |
fi | |
if [ $(git rev-list --count HEAD) -gt 1 ]; then | |
git diff HEAD^ HEAD -- userChrome.css > diff.txt | |
else | |
echo "No previous commit to compare." > diff.txt | |
fi | |
- name: Read Diff | |
id: read_diff | |
run: echo "::set-output name=diff::$(cat diff.txt)" | |
- name: Create Pre-Release | |
id: create_pre_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: "pre-release-${{ github.sha }}" | |
release_name: "Pre-Release ${{ github.sha }}" | |
body: | | |
Pre-release for commit ${{ github.sha }} | |
Changes in userChrome.css: | |
${{ steps.read_diff.outputs.diff }} | |
draft: false | |
prerelease: true | |
files: userChrome.css | |
make_latest: true |