Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix github workflows Nexus #452

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/changelog-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,19 @@ jobs:
fetch-depth: 0
path: ${{ github.event.repository.name }}

# Checkout the required scripts from kodi-pvr/pvr-scripts into the 'scripts' directory
# Checkout the required scripts from xbmc/binary-addon-scripts into the 'scripts' directory
- name: Checkout Scripts
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: kodi-pvr/pvr-scripts
repository: xbmc/binary-addon-scripts
path: scripts

# Install all dependencies required by the following steps
# - libxml2-utils, xmlstarlet: reading news and version from addon.xml.in
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-utils xmlstarlet

# Setup python version 3.9
Expand Down Expand Up @@ -84,6 +85,7 @@ jobs:
# - steps.required-variables.outputs.version: version element from addon.xml.in
# - steps.required-variables.outputs.branch: branch of the triggering ref
# - steps.required-variables.outputs.today: today's date in format '%Y-%m-%d'
# Note: we use a random EOF for 'changes' as is best practice for for multiline variables
- name: Get required variables
id: required-variables
run: |
Expand All @@ -92,12 +94,10 @@ jobs:
then
changes=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/extension/news)' | awk -v RS= 'NR==1')
fi
changes="${changes//'%'/'%25'}"
changes="${changes//$'\n'/'%0A'}"
changes="${changes//$'\r'/'%0D'}"
changes="${changes//$'\\n'/'%0A'}"
changes="${changes//$'\\r'/'%0D'}"
echo "changes=$changes" >> $GITHUB_OUTPUT
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "changes<<$EOF" >> $GITHUB_OUTPUT
echo "$changes" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)')
echo "version=$version" >> $GITHUB_OUTPUT
branch=$(echo ${GITHUB_REF#refs/heads/})
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/increment-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-utils xmlstarlet

- name: Get required variables
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ jobs:
# - libxml2-utils, xmlstarlet: reading news and version from addon.xml.in
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-utils xmlstarlet

# Create the variables required by the following steps
# - steps.required-variables.outputs.changes: latest entry in the changelog.txt (if exists), or addon.xml.in news element
# - steps.required-variables.outputs.version: version element from addon.xml.in
# - steps.required-variables.outputs.branch: branch of the triggering ref
# Note: we use a random EOF for 'changes' as is best practice for for multiline variables
- name: Get required variables
id: required-variables
run: |
Expand All @@ -37,12 +39,10 @@ jobs:
then
changes=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/extension/news)' | awk -v RS= 'NR==1')
fi
changes="${changes//'%'/'%25'}"
changes="${changes//$'\n'/'%0A'}"
changes="${changes//$'\r'/'%0D'}"
changes="${changes//$'\\n'/'%0A'}"
changes="${changes//$'\\r'/'%0D'}"
echo "changes=$changes" >> $GITHUB_OUTPUT
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "changes<<$EOF" >> $GITHUB_OUTPUT
echo "$changes" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)')
echo "version=$version" >> $GITHUB_OUTPUT
branch=$(echo ${GITHUB_REF#refs/heads/})
Expand Down