Update README.md #13
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies and package | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| - name: Run --help command | |
| run: fetchbin --help | |
| - name: Run --version command | |
| run: fetchbin --version | |
| - name: Share output and extract delete token | |
| id: share | |
| run: | | |
| output=$(fetchbin share -s uname -a) | |
| echo "$output" | |
| delete_url=$(echo "$output" | grep 'Delete URL' | awk '{print $3}') | |
| if [ -z "$delete_url" ]; then | |
| echo "Error: Delete URL not found in the output." | |
| exit 1 | |
| fi | |
| delete_token=$(basename "$delete_url") | |
| echo "delete_token=$delete_token" >> $GITHUB_OUTPUT | |
| - name: Delete the shared output | |
| run: | | |
| token="${{ steps.share.outputs.delete_token }}" | |
| if [ -z "$token" ]; then | |
| echo "Error: Delete token is empty." | |
| exit 1 | |
| fi | |
| echo "Attempting to delete with token: $token" | |
| fetchbin delete "$token" |