From b26ee6ea7df04210fa89d81e997b7e666a11713d Mon Sep 17 00:00:00 2001 From: Cheap Nightbot Date: Fri, 15 Nov 2024 23:42:15 +0900 Subject: [PATCH] Delete .github/workflows directory aaaaaaaaaaaaaaaaa --- .github/workflows/main.yml | 84 -------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 1bfad89..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Build CLI App - -on: - push: - branches: - - main - pull_request: - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - - - name: Set up GCC and Make - run: | - if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then - sudo apt-get update - sudo apt-get install -y gcc make - elif [ ${{ matrix.os }} == 'macos-latest' ]; then - brew install gcc make - fi - shell: bash - - - name: Build - run: | - make - shell: bash - - - name: Verify Binary - run: | - file build/calc - shell: bash - - - name: Create Release - id: create_release - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - run: | - RELEASE_TAG=$(date +'%Y-%m-%d') - - # Create a release on GitHub and capture the response - RESPONSE=$(curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -d '{"tag_name": "'"$RELEASE_TAG"'","name": "'"$RELEASE_TAG"'","body": "Automated release of calc binaries."}' \ - "https://api.github.com/repos/${{ github.repository }}/releases") - - # Extract the release ID from the response - RELEASE_ID=$(echo $RESPONSE | jq -r .id) - if [[ "$RELEASE_ID" == "null" ]]; then - echo "Error creating release" - exit 1 - else - echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV - fi - shell: bash - - - name: Upload Binaries to Release - run: | - BUILD_DATE=$(date +'%Y-%m-%d') - - if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then - FILENAME="calc-linux-x86_64-${BUILD_DATE}.zip" - zip -r $FILENAME build/calc - elif [ ${{ matrix.os }} == 'macos-latest' ]; then - FILENAME="calc-macos-x86_64-${BUILD_DATE}.zip" - zip -r $FILENAME build/calc - fi - - # Ensure the release ID is set - if [ -z "${{ env.RELEASE_ID }}" ]; then - echo "Release ID is not set, exiting..." - exit 1 - fi - - # Upload the binary zip file to the release - curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Content-Type: application/zip" \ - --data-binary @$FILENAME \ - "https://uploads.github.com/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=$FILENAME" - shell: bash