release #25
This file contains 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: release | |
on: | |
schedule: | |
- cron: '0 0 * * 1' | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build DmiDecode | |
run: | | |
./build.sh | |
if [ -f "build/dmidecode_linux_amd64.tar.gz" ] ; then | |
git config --global user.name "LubinLew" | |
git config --global user.email "lgbxyz@gmail.com" | |
git add version.txt | |
VERSION=`cat version.txt` | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "GOON=true" >> $GITHUB_ENV | |
git commit -m "dmidecode ${VERSION}" | |
git push | |
echo "dmidecode ${VERSION}" > release.md | |
else | |
echo "GOON=false" >> $GITHUB_ENV | |
fi | |
- name: Create Tag | |
uses: rickstaa/action-create-tag@v1 | |
if: env.GOON == 'true' | |
with: | |
tag: ${{env.VERSION}} | |
message: "dmidecode ${{env.VERSION}}" | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
if: env.GOON == 'true' | |
with: | |
tag: ${{env.VERSION}} | |
name: "dmidecode ${{env.VERSION}}" | |
artifacts: "*.log,build/*.tar.gz" | |
bodyFile: "release.md" | |
token: ${{ secrets.GITHUB_TOKEN }} |