Skip to content

Commit

Permalink
Update k2p.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xuexijiaoben authored Feb 1, 2024
1 parent c025a56 commit 4c18f9e
Showing 1 changed file with 30 additions and 20 deletions.
50 changes: 30 additions & 20 deletions .github/workflows/k2p.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ jobs:
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
echo "status=success" >> ${GITHUB_OUTPUT}
- name: Upload firmware directory
uses: actions/upload-artifact@main
if: steps.organize.outputs.status == 'success' && !cancelled()
with:
name: OpenWrt_firmware${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}
path: ${{ env.FIRMWARE }}
# - name: Upload firmware directory
# uses: actions/upload-artifact@main
# if: steps.organize.outputs.status == 'success' && !cancelled()
# with:
# name: OpenWrt_firmware${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}
# path: ${{ env.FIRMWARE }}

- name: Upload firmware to cowtransfer
id: cowtransfer
Expand All @@ -213,27 +213,37 @@ jobs:
echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)"
echo "url=$(cat wetransfer.log | grep https | cut -f3 -d" ")" >> ${GITHUB_OUTPUT}
- name: Generate release tag
id: tag
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
run: |
echo "release_tag=$(date +"%Y.%m.%d-%H%M")" >> ${GITHUB_OUTPUT}
touch release.txt
[ $UPLOAD_COWTRANSFER = true ] && echo "πŸ”— [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt
[ $UPLOAD_WETRANSFER = true ] && echo "πŸ”— [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt
echo "status=success" >> ${GITHUB_OUTPUT}
# - name: Generate release tag
# id: tag
# if: env.UPLOAD_RELEASE == 'true' && !cancelled()
# run: |
# echo "release_tag=$(date +"%Y.%m.%d-%H%M")" >> ${GITHUB_OUTPUT}
# touch release.txt
# [ $UPLOAD_COWTRANSFER = true ] && echo "πŸ”— [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt
# [ $UPLOAD_WETRANSFER = true ] && echo "πŸ”— [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt
# echo "status=success" >> ${GITHUB_OUTPUT}

- name: Upload firmware to release
uses: softprops/action-gh-release@v1
if: steps.tag.outputs.status == 'success' && !cancelled()
uses: ncipollo/[email protected]
# uses: softprops/action-gh-release@v1
# if: steps.tag.outputs.status == 'success' && !cancelled()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ env.FILE_DATE }} for ${{ env.OPENWRT_TAG }} ${{ env.EMOJI }}
tag_name: ${{ env.OPENWRT_TAG }}
tag: ${{ env.OPENWRT_TAG }}
# tag_name: ${{ steps.tag.outputs.release_tag }}
body_path: release.txt
files: ${{ env.FIRMWARE }}/*
# body_path: release.txt
# files: ${{ env.FIRMWARE }}/*
allowUpdates: true
body: |
This is OpenWrt firmware for k2p
### πŸ“’ Firmware information
- ⚽ 固仢源码: ${{ env.REPO_URL }}
- πŸ’ ζΊη εˆ†ζ”―: ${{ env.REPO_BRANCH }}
- 🌐 Default IP: 192.168.2.1
- πŸ”‘ Default username: root
- πŸ”‘ Default password: password
- name: Delete workflow runs
uses: Mattraks/[email protected]
Expand Down

0 comments on commit 4c18f9e

Please sign in to comment.