Update .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Sthope 2023-08-28 18:42:01 +02:00
parent 613dafa204
commit 7aaa123224

View File

@ -4,18 +4,12 @@ name: release
steps: steps:
- name: create-script-file - name: create-script-file
image: alpine:3.13 image: alpine:3.13
environment:
REPO_OWNER: "insignia-live"
REPO_NAME: "setup-assistant-release"
commands: commands:
- echo "const axios = require('axios');" > custom-script.js - echo "const axios = require('axios');" > custom-script.js
- echo "" >> custom-script.js - echo "" >> custom-script.js
- echo "function getLatestReleaseTag() {" >> custom-script.js - echo "function getLatestReleaseTag() {" >> custom-script.js
- echo " const repoOwner = process.env.REPO_OWNER;" >> custom-script.js
- echo " const repoName = process.env.REPO_NAME;" >> custom-script.js
- echo "" >> custom-script.js
- echo " return axios" >> custom-script.js - echo " return axios" >> custom-script.js
- echo " .get(\`https://api.github.com/repos/\${repoOwner}/\${repoName}/releases/latest\`)" >> custom-script.js - echo " .get('https://api.github.com/repos/insignia-live/setup-assistant-release/releases/latest')" >> custom-script.js
- echo " .then((response) => response.data.tag_name)" >> custom-script.js - echo " .then((response) => response.data.tag_name)" >> custom-script.js
- echo " .catch((error) => {" >> custom-script.js - echo " .catch((error) => {" >> custom-script.js
- echo " console.error('Error fetching latest release tag:', error.message);" >> custom-script.js - echo " console.error('Error fetching latest release tag:', error.message);" >> custom-script.js