Updated workflow

This commit is contained in:
Juan Gilsanz Polo 2024-09-11 19:27:04 +02:00
parent a171eda41c
commit 67bc6a1716

View file

@ -80,15 +80,14 @@ jobs:
- name: Decode .env - name: Decode .env
run: echo "${{ secrets.ENV }}" | base64 --decode > .env run: echo "${{ secrets.ENV }}" | base64 --decode > .env
- name: Read pubspec.yaml - name: Read pubspec.yaml
uses: adore-me/read-yaml@v1.0.0 uses: pietrobolcato/action-read-yaml@1.0.0
id: read_pubspec id: read_pubspec
with: with:
file: './pubspec.yaml' config: ${{ github.workspace }}/pubspec.yaml
key-path: '["version"]'
- name: Save version on env variable - name: Save version on env variable
id: save_version id: save_version
run: | run: |
version=${{ steps.read_pubspec.outputs.data }} version=${{ steps.read_pubspec.outputs['version'] }}
IFS='+' IFS='+'
read -r -a split <<< "$version" read -r -a split <<< "$version"
echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV
@ -140,15 +139,14 @@ jobs:
- name: Decode .env - name: Decode .env
run: echo "${{ secrets.ENV }}" | base64 --decode > .env run: echo "${{ secrets.ENV }}" | base64 --decode > .env
- name: Read pubspec.yaml - name: Read pubspec.yaml
uses: adore-me/read-yaml@v1.0.0 uses: pietrobolcato/action-read-yaml@1.0.0
id: read_pubspec id: read_pubspec
with: with:
file: './pubspec.yaml' config: ${{ github.workspace }}/pubspec.yaml
key-path: '["version"]'
- name: Save version on env variable - name: Save version on env variable
id: save_version id: save_version
run: | run: |
version=${{ steps.read_pubspec.outputs.data }} version=${{ steps.read_pubspec.outputs['version'] }}
IFS='+' IFS='+'
read -r -a split <<< "$version" read -r -a split <<< "$version"
echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV
@ -203,16 +201,14 @@ jobs:
run: | run: |
[IO.File]::WriteAllBytes('.env', [Convert]::FromBase64String('${{ secrets.ENV }}')) [IO.File]::WriteAllBytes('.env', [Convert]::FromBase64String('${{ secrets.ENV }}'))
- name: Read pubspec.yaml - name: Read pubspec.yaml
uses: adore-me/read-yaml@v1.0.0 uses: pietrobolcato/action-read-yaml@1.0.0
id: read_pubspec id: read_pubspec
with: with:
file: './pubspec.yaml' config: ${{ github.workspace }}/pubspec.yaml
key-path: '["version"]'
- name: Save version on env variable - name: Save version on env variable
shell: bash
id: save_version id: save_version
run: | run: |
version=${{ steps.read_pubspec.outputs.data }} version=${{ steps.read_pubspec.outputs['version'] }}
IFS='+' IFS='+'
read -r -a split <<< "$version" read -r -a split <<< "$version"
echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV