From da6854b7342fed6a69219e10140fe6f77cfa58b5 Mon Sep 17 00:00:00 2001 From: Alec Delaney <89490472+tekktrik@users.noreply.github.com> Date: Tue, 7 Feb 2023 12:49:44 -0500 Subject: [PATCH] Update CI --- .github/workflows/build.yml | 13 +++++-------- .github/workflows/images.yml | 8 ++------ .github/workflows/release.yml | 26 +++++++++----------------- 3 files changed, 16 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 189f8610..acbb3205 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,28 +10,25 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Dump GitHub context - uses: actions/github-script@v6 - with: - script: console.log(JSON.stringify(context, null, 2)) - name: Translate Repo Name For Build Tools filename_prefix id: repo-name run: | - echo ::set-output name=repo-name::$( + echo "repo-name=$( echo ${{ github.repository }} | awk -F '\/' '{ print tolower($2) }' | tr '_' '-' - ) + )" >> $GITHUB_OUTPUT - name: Set up Python 3.10 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Versions run: | python3 --version - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true + fetch-depth: 0 - name: Install deps run: | sudo apt-get install gettext diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index 3c5ed461..cab42f19 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -18,16 +18,12 @@ jobs: if: github.repository_owner == 'adafruit' runs-on: ubuntu-20.04 steps: - - name: Dump GitHub context - uses: actions/github-script@v6 - with: - script: console.log(JSON.stringify(context, null, 2)) - - uses: actions/checkout@v2.2.0 + - uses: actions/checkout@v3 - name: checkout submodules run: git submodule update --init --jobs 16 --depth 1 - name: Set up Python 3.10 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bf560c1..bccd15ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,28 +12,25 @@ jobs: upload-release-assets: runs-on: ubuntu-latest steps: - - name: Dump GitHub context - uses: actions/github-script@v6 - with: - script: console.log(JSON.stringify(context, null, 2)) - name: Translate Repo Name For Build Tools filename_prefix id: repo-name run: | - echo ::set-output name=repo-name::$( + echo "repo-name=$( echo ${{ github.repository }} | awk -F '\/' '{ print tolower($2) }' | tr '_' '-' - ) + )" >> $GITHUB_OUTPUT - name: Set up Python 3.10 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Versions run: | python3 --version - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true + fetch-depth: 0 - name: Install deps run: | sudo apt-get install gettext @@ -41,16 +38,11 @@ jobs: - name: Build assets run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location libraries --library_depth 2 --package_folder_prefix "adafruit_, asyncio" - name: Upload Release Assets - # the 'official' actions version does not yet support dynamically - # supplying asset names to upload. @csexton's version chosen based on - # discussion in the issue below, as its the simplest to implement and - # allows for selecting files with a pattern. - # https://github.com/actions/upload-release-asset/issues/4 - #uses: actions/upload-release-asset@v1.0.1 - uses: csexton/release-asset-action@master + uses: shogo82148/actions-upload-release-asset@v1 with: - pattern: "bundles/*" - github-token: ${{ secrets.GITHUB_TOKEN }} + asset_path: "bundles/*" + github_token: ${{ secrets.GITHUB_TOKEN }} + upload_url: ${{ github.event.release.upload_url }} - name: Upload Assets To AWS S3 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}