diff --git a/.github/actions/release-images/action.yml b/.github/actions/release-images/action.yml index 633f709..4b886b0 100644 --- a/.github/actions/release-images/action.yml +++ b/.github/actions/release-images/action.yml @@ -7,15 +7,37 @@ inputs: repo_token: required: true description: "Github repository personal access token" + access_key: + required: true + description: "Digital Ocean spaces access key" + secret_key: + required: true + description: "Digital Ocean spaces secret key" + space_name: + required: true + description: "Digital Ocean spaces name" + space_region: + required: true + description: "Digital Ocean spaces region" + tag: + description: "The tag version of the release" runs: using: "composite" steps: - name: Download all workflow artifacts uses: actions/download-artifact@v3 + - uses: BetaHuhn/do-spaces-action@v2 + with: + access_key: ${{ inputs.access_key}} + secret_key: ${{ inputs.secret_key }} + space_name: ${{ inputs.space_name }} + space_region: ${{ inputs.space_region }} + source: artifacts + out_dir: "releases_${{ inputs.tag }}" - name: "✏️ Upload imgs and release" uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ inputs.repo_token }}" prerelease: ${{ inputs.pre-release }} - files: | - artifacts/* \ No newline at end of file + # files: | + # artifacts/* diff --git a/.github/workflows/balena-tag-release.yml b/.github/workflows/balena-tag-release.yml index 0aec077..dd4f19c 100644 --- a/.github/workflows/balena-tag-release.yml +++ b/.github/workflows/balena-tag-release.yml @@ -67,18 +67,23 @@ jobs: balena_device: ${{ matrix.image }} tag: ${{ needs.balena-deploy.outputs.github_tag }} - github-release: + github-images-release: runs-on: ubuntu-latest needs: [balena-deploy, balena-build-images] steps: - name: Checkout uses: actions/checkout@v2 - - name: Create Github pre-release + - name: Create Github release and upload images uses: ./.github/actions/release-images with: pre-release: false repo_token: "${{ secrets.PAT }}" + access_key: ${{ secrets.ACCESS_KEY}} + secret_key: ${{ secrets.SECRET_KEY }} + space_name: ${{ secrets.SPACE_NAME }} + space_region: ${{ secrets.SPACE_REGION }} + tag: ${{ needs.balena-deploy.outputs.github_tag }} #TODO: Download and inject content into the image # - name: Mount Image diff --git a/balena.yml b/balena.yml index 7422701..a3a6e42 100644 --- a/balena.yml +++ b/balena.yml @@ -1,6 +1,6 @@ name: "Earth Defender's Toolkit Offline" type: "sw.application" -version: 0.4.5 +version: 0.4.6 description: "A low-energy device that creates an access-point serving applications, bridging them and exposing curated content offline. Software stack and content are automatically updated while online, and can be updated offline." assets: